Skip to content
This repository
Browse code

Fix for atexit crash when running GtkAgg backend but not actually sho…

…wing any windows.
  • Loading branch information...
commit de18d9ab21146e98bd8413179b7a76ae994d3aea 1 parent 41c800e
Michael Droettboom mdboom authored

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. +2 1  lib/matplotlib/backends/backend_gtk.py
3  lib/matplotlib/backends/backend_gtk.py
@@ -549,7 +549,8 @@ def destroy(self, *args):
549 549 if _debug: print 'FigureManagerGTK.%s' % fn_name()
550 550 self.vbox.destroy()
551 551 self.window.destroy()
552   - self.canvas.destroy()
  552 + if hasattr(self, 'canvas'):
  553 + self.canvas.destroy()
553 554 if self.toolbar:
554 555 self.toolbar.destroy()
555 556 self.__dict__.clear() #Is this needed? Other backends don't have it.

0 comments on commit de18d9a

Please sign in to comment.
Something went wrong with that request. Please try again.