Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 668ef6d commit 91e7d98Copy full SHA for 91e7d98
1 file changed
lib/matplotlib/backends/backend_gtk.py
@@ -547,11 +547,13 @@ def notify_axes_change(fig):
547
548
def destroy(self, *args):
549
if _debug: print 'FigureManagerGTK.%s' % fn_name()
550
- self.vbox.destroy()
551
- self.window.destroy()
+ if hasattr(self, 'vbox'):
+ self.vbox.destroy()
552
+ if hasattr(self, 'window'):
553
+ self.window.destroy()
554
if hasattr(self, 'canvas'):
555
self.canvas.destroy()
- if self.toolbar:
556
+ if hasattr(self, 'toolbar'):
557
self.toolbar.destroy()
558
self.__dict__.clear() #Is this needed? Other backends don't have it.
559
0 commit comments