Skip to content

Commit

Permalink
Fix crash in simplehist visualisation
Browse files Browse the repository at this point in the history
  • Loading branch information
tkittel committed Apr 30, 2024
1 parent 80cbda2 commit 3c1c242
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ def _resize_text_reltofig(figure,textobject,maxsize=0.8):
def do_resize(canvas):
if canvas in currently_resizing:
return#prevent triggering recursion
if textobject.figure is None:
return#Avoid crash in textobject.get_window_extent call
currently_resizing.add(canvas)
width,height=canvas.get_width_height()
vis = textobject.get_visible()
Expand Down

0 comments on commit 3c1c242

Please sign in to comment.