Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 997c0d9

Browse files
committed
Don't try to delete nonexistent toolbar in backend_gtk
svn path=/branches/v0_98_5_maint/; revision=6809
1 parent 2a59069 commit 997c0d9

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

CHANGELOG

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
2009-01-19 Fix bug in backend_gtk: don't delete nonexistent toolbar. - EF
22

33
2009-01-16 Fix bug in is_string_like so it doesn't raise an
44
unnecessary exception. - EF

lib/matplotlib/backends/backend_gtk.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,8 @@ def destroy(self, *args):
484484
self.vbox.destroy()
485485
self.window.destroy()
486486
self.canvas.destroy()
487-
self.toolbar.destroy()
487+
if self.toolbar:
488+
self.toolbar.destroy()
488489
self.__dict__.clear()
489490

490491
if Gcf.get_num_fig_managers()==0 and \

0 commit comments

Comments
 (0)