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 @@ -381,6 +381,7 @@ def onrequest(url):
381381 QDir .addSearchPath ("canvas_icons" , os .path .join (dirpath , "icons" ))
382382
383383 canvas_window = CanvasMainWindow ()
384+ canvas_window .setAttribute (Qt .WA_DeleteOnClose )
384385 canvas_window .setWindowIcon (config .application_icon ())
385386
386387 if stylesheet_string is not None :
@@ -462,8 +463,8 @@ def show_message(message):
462463 canvas_window .load_scheme (open_requests [- 1 ].toLocalFile ())
463464
464465 # local references prevent destruction
465- _ = show_survey ()
466- __ = check_for_updates ()
466+ survey = show_survey ()
467+ update_check = check_for_updates ()
467468
468469 # Tee stdout and stderr into Output dock
469470 log_view = canvas_window .log_view ()
@@ -491,12 +492,14 @@ def show_message(message):
491492 status = app .exec_ ()
492493 except BaseException :
493494 log .error ("Error in main event loop." , exc_info = True )
495+ status = 42
494496
495- canvas_window .deleteLater ()
496- app .processEvents ()
497- app .flush ()
498497 del canvas_window
498+ del survey
499+ del update_check
499500
501+ app .processEvents ()
502+ app .flush ()
500503 # Collect any cycles before deleting the QApplication instance
501504 gc .collect ()
502505
You can’t perform that action at this time.
0 commit comments