File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -400,6 +400,7 @@ def onrequest(url):
400400 QDir .addSearchPath ("canvas_icons" , os .path .join (dirpath , "icons" ))
401401
402402 canvas_window = CanvasMainWindow ()
403+ canvas_window .setAttribute (Qt .WA_DeleteOnClose )
403404 canvas_window .setWindowIcon (config .application_icon ())
404405
405406 if stylesheet_string is not None :
@@ -481,8 +482,8 @@ def show_message(message):
481482 canvas_window .load_scheme (open_requests [- 1 ].toLocalFile ())
482483
483484 # local references prevent destruction
484- _ = show_survey ()
485- __ = check_for_updates ()
485+ survey = show_survey ()
486+ update_check = check_for_updates ()
486487
487488 # Tee stdout and stderr into Output dock
488489 log_view = canvas_window .log_view ()
@@ -510,12 +511,14 @@ def show_message(message):
510511 status = app .exec_ ()
511512 except BaseException :
512513 log .error ("Error in main event loop." , exc_info = True )
514+ status = 42
513515
514- canvas_window .deleteLater ()
515- app .processEvents ()
516- app .flush ()
517516 del canvas_window
517+ del survey
518+ del update_check
518519
520+ app .processEvents ()
521+ app .flush ()
519522 # Collect any cycles before deleting the QApplication instance
520523 gc .collect ()
521524
You can’t perform that action at this time.
0 commit comments