Browse Source

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

If no vector map has been selected.
Tomas Zigo 3 years ago
parent
commit
9377fec11a
1 changed files with 2 additions and 1 deletions
  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)