From c51ca666c368c9d17e7f1fd9f4094a0735160b7c Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 5 May 2020 13:48:38 +1000 Subject: [PATCH] catch schema mod in background If the schema confirmation dialog is shown on a background thread it will crash the app, so we convert this to an assertion error that gets caught by the error handler. Code still needs to be updated to modify the schema prior to moving to the background, but at least this way it doesn't crash. --- qt/aqt/main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/qt/aqt/main.py b/qt/aqt/main.py index e308e7b06..d520f8d02 100644 --- a/qt/aqt/main.py +++ b/qt/aqt/main.py @@ -1283,6 +1283,7 @@ and if the problem comes up again, please ask on the support site.""" ########################################################################## def onSchemaMod(self, arg): + assert self.inMainThread() progress_shown = self.progress.busy() if progress_shown: self.progress.finish()