Skip to content

Commit 570a01a

Browse files
authored
Fix show_message_box crashing with None description in Python (#7748)
1 parent dd1f2b0 commit 570a01a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

python/interaction.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1522,14 +1522,14 @@ def show_message_box(title, text, buttons=MessageBoxButtonSet.OKButtonSet, icon=
15221522
15231523
:note: This uses a standard QDialog which means simple HTML will render as HTML, but links are not clickable and special characters need to be escaped.
15241524
1525-
:param str title: Text title for the message box.
1526-
:param str text: Text for the main body of the message box.
1525+
:param str | None title: Text title for the message box.
1526+
:param str | None text: Text for the main body of the message box.
15271527
:param MessageBoxButtonSet buttons: One of :py:class:`MessageBoxButtonSet`
15281528
:param MessageBoxIcon icon: One of :py:class:`MessageBoxIcon`
15291529
:return: Which button was selected
15301530
:rtype: MessageBoxButtonResult
15311531
"""
1532-
return core.BNShowMessageBox(title, text, buttons, icon)
1532+
return core.BNShowMessageBox(title or "", text or "", buttons, icon)
15331533

15341534

15351535
def open_url(url):

0 commit comments

Comments
 (0)