mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
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.
This commit is contained in:
parent
6e6d9ee1a3
commit
c51ca666c3
1 changed files with 1 additions and 0 deletions
|
@ -1283,6 +1283,7 @@ and if the problem comes up again, please ask on the support site."""
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
||||||
def onSchemaMod(self, arg):
|
def onSchemaMod(self, arg):
|
||||||
|
assert self.inMainThread()
|
||||||
progress_shown = self.progress.busy()
|
progress_shown = self.progress.busy()
|
||||||
if progress_shown:
|
if progress_shown:
|
||||||
self.progress.finish()
|
self.progress.finish()
|
||||||
|
|
Loading…
Reference in a new issue