mirror of
https://github.com/ankidroid/Anki-Android.git
synced 2024-09-20 12:02:16 +02:00
Don't crash when loadCounts() called while Activity has been stopped
This commit is contained in:
parent
f362d69ea8
commit
cde218287a
@ -209,7 +209,12 @@ public class DeckPicker extends NavigationDrawerActivity implements OnShowcaseEv
|
|||||||
Long did = getCol().getDecks().current().getLong("id");
|
Long did = getCol().getDecks().current().getLong("id");
|
||||||
setSelectedDeck(did);
|
setSelectedDeck(did);
|
||||||
if (mFragmented) {
|
if (mFragmented) {
|
||||||
loadStudyOptionsFragment(did, null);
|
try {
|
||||||
|
loadStudyOptionsFragment(did, null);
|
||||||
|
} catch (IllegalStateException e) {
|
||||||
|
// If activity has been stopped then just ignore the updated counts
|
||||||
|
Log.e(AnkiDroidApp.TAG, "DeckPicker mLoadCountsHandler -- could not update StudyOptionsFragment");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user