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.
2 parents 53f8139 + 91e7d98 commit ffd4581Copy full SHA for ffd4581
lib/matplotlib/backends/backend_gtk.py
@@ -547,10 +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()
552
- self.canvas.destroy()
553
- if self.toolbar:
+ if hasattr(self, 'vbox'):
+ self.vbox.destroy()
+ if hasattr(self, 'window'):
+ self.window.destroy()
554
+ if hasattr(self, 'canvas'):
555
+ self.canvas.destroy()
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