瀏覽代碼

wxGUI/mapswipe: call dialog Uninit only when dialog was actually created, fix for #833 (#836)

Anna Petrasova 4 年之前
父節點
當前提交
c9eb39e2fe
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      gui/wxpython/mapswipe/frame.py

+ 2 - 1
gui/wxpython/mapswipe/frame.py

@@ -754,7 +754,8 @@ class SwipeMapFrame(DoubleMapFrame):
         self.GetFirstMap().Clean()
         self.GetSecondMap().Clean()
         self._mgr.UnInit()
-        self._inputDialog.UnInit()
+        if self._inputDialog:
+            self._inputDialog.UnInit()
         self.Destroy()