Skip to content

Commit 4b0a26a

Browse files
committed
FIX: be more cautious about checking widget size
This can fail if the c++ side of the object has already been cleaned up but the Python side is still lingering (due to refs in callbacks). closes #29618
1 parent d3491dc commit 4b0a26a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/backend_qt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ def _draw_idle(self):
517517
if not self._draw_pending:
518518
return
519519
self._draw_pending = False
520-
if self.height() <= 0 or self.width() <= 0:
520+
if _isdeleted(self) or self.height() <= 0 or self.width() <= 0:
521521
return
522522
try:
523523
self.draw()

0 commit comments

Comments
 (0)