浏览代码

wxGUI GroupDialog: fix StaticText widget existence check (#647)

Notification is issued after the dialog is destroyed.
Tomas Zigo 5 年之前
父节点
当前提交
4ee9c1f870
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      gui/wxpython/gui_core/dialogs.py

+ 3 - 2
gui/wxpython/gui_core/dialogs.py

@@ -49,7 +49,7 @@ from gui_core.widgets import SingleSymbolPanel, GListCtrl, SimpleValidator, \
 from core.settings import UserSettings
 from core.debug import Debug
 from gui_core.wrap import Button, CheckListBox, EmptyBitmap, HyperlinkCtrl, \
-    Menu, NewId, SpinCtrl, StaticBox, StaticText, TextCtrl 
+    Menu, NewId, SpinCtrl, StaticBox, StaticText, TextCtrl
 
 
 class SimpleDialog(wx.Dialog):
@@ -1329,7 +1329,8 @@ class GroupDialog(wx.Dialog):
 
     def ClearNotification(self):
         """Clear notification string"""
-        self.infoLabel.SetLabel("")
+        if self.infoLabel:
+            self.infoLabel.SetLabel("")
 
     def ApplyChanges(self):
         """Create or edit group"""