Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5c5e638

Browse filesBrowse files
authored
Merge pull request #14294 from meeseeksmachine/auto-backport-of-pr-14282-on-v3.1.x
Backport PR #14282 on branch v3.1.x (Fix toolmanager's destroy subplots in tk)
2 parents 095830e + a703d87 commit 5c5e638
Copy full SHA for 5c5e638

File tree

Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed

‎lib/matplotlib/backends/_backend_tk.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/_backend_tk.py
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -912,8 +912,9 @@ def init_window(self):
912912
self.window.protocol("WM_DELETE_WINDOW", self.destroy)
913913

914914
def destroy(self, *args, **kwargs):
915-
self.window.destroy()
916-
self.window = None
915+
if self.window is not None:
916+
self.window.destroy()
917+
self.window = None
917918

918919

919920
class HelpTk(backend_tools.ToolHelpBase):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.