From 07989afa3815bc361032ce2c00329558aa36fc81 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 4 Mar 2021 11:02:48 +1000 Subject: [PATCH] fix infinite loop on card answer when parent is missing deck --- rslib/src/storage/deck/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rslib/src/storage/deck/mod.rs b/rslib/src/storage/deck/mod.rs index f0e0c5045..aaf19ad69 100644 --- a/rslib/src/storage/deck/mod.rs +++ b/rslib/src/storage/deck/mod.rs @@ -202,6 +202,9 @@ impl SqliteStorage { if let Some(parent_did) = self.get_deck_id(parent_name)? { let parent = self.get_deck(parent_did)?.unwrap(); decks.push(parent); + } else { + // missing parent + break; } }