8000 Attempting to resize when toolbar has been turned off causes an unhan… · matplotlib/matplotlib@b344ab8 · GitHub
[go: up one dir, main page]

Skip to content

Commit b344ab8

Browse files
author
Stephen Horst
committed
Attempting to resize when toolbar has been turned off causes an unhandled exception
1 parent ba68e6f commit b344ab8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/backends/backend_tkagg.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,8 @@ def resize(self, width, height=None):
562562
else:
563563
self.canvas._tkcanvas.master.geometry("%dx%d" % (width, height))
564564

565-
self.toolbar.configure(width=width)
565+
if self.toolbar is not None:
566+
self.toolbar.configure(width=width)
566567

567568
def show(self):
568569
"""

0 commit comments

Comments
 (0)
0