diff --git a/invesalius/gui/dialogs.py b/invesalius/gui/dialogs.py index b54bc1d..4bc90c4 100644 --- a/invesalius/gui/dialogs.py +++ b/invesalius/gui/dialogs.py @@ -377,8 +377,11 @@ def SaveChangesDialog(filename): dlg = wx.MessageDialog(None, msg, "InVesalius 3", wx.ICON_QUESTION | wx.YES_NO | wx.CANCEL) + try: + answer = dlg.ShowModal() + except(wx._core.PyAssertionError): + answer = dlg.GetReturnCode() - answer = dlg.ShowModal() dlg.Destroy() os.chdir(current_dir) -- libgit2 0.21.2