فهرست منبع

wxGUI/vdigit: fix close settings dialog (#1394)

If no vector map has been selected.
Tomas Zigo 4 سال پیش
والد
کامیت
9377fec11a
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      gui/wxpython/mapwin/buffered.py

+ 2 - 1
gui/wxpython/mapwin/buffered.py

@@ -615,7 +615,8 @@ class BufferedMapWindow(MapWindowBase, Window):
                 # decorate with GDDC (transparency)
                 try:
                     gcdc = wx.GCDC(dc)
-                    self.pdcVector.DrawToDCClipped(gcdc, rgn)
+                    if self.pdcVector:
+                        self.pdcVector.DrawToDCClipped(gcdc, rgn)
                 except NotImplementedError as e:
                     print(e, file=sys.stderr)
                     self.pdcVector.DrawToDCClipped(dc, rgn)