Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1dff078 + dc09ae6 commit 4cf1bb7Copy full SHA for 4cf1bb7
lib/matplotlib/backends/backend_qt.py
@@ -333,7 +333,8 @@ def keyReleaseEvent(self, event):
333
334
def resizeEvent(self, event):
335
frame = sys._getframe()
336
- if frame.f_code is frame.f_back.f_code: # Prevent PyQt6 recursion.
+ # Prevent PyQt6 recursion, but sometimes frame.f_back is None
337
+ if frame.f_code is getattr(frame.f_back, 'f_code', None):
338
return
339
w = event.size().width() * self.device_pixel_ratio
340
h = event.size().height() * self.device_pixel_ratio
0 commit comments