From cb293db09a02db33203083d65d2125c37b66cfcf Mon Sep 17 00:00:00 2001 From: RickyRister Date: Tue, 24 Dec 2024 14:19:37 -0800 Subject: [PATCH] only update recents on successful open --- cockatrice/src/client/tabs/tab_deck_editor.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cockatrice/src/client/tabs/tab_deck_editor.cpp b/cockatrice/src/client/tabs/tab_deck_editor.cpp index 7ea9cbdba..f9e980e84 100644 --- a/cockatrice/src/client/tabs/tab_deck_editor.cpp +++ b/cockatrice/src/client/tabs/tab_deck_editor.cpp @@ -956,10 +956,9 @@ void TabDeckEditor::openDeckFromFile(const QString &fileName, DeckOpenLocation d { DeckLoader::FileFormat fmt = DeckLoader::getFormatFromName(fileName); - SettingsCache::instance().recents().updateRecentlyOpenedDeckPaths(fileName); - auto *l = new DeckLoader; if (l->loadFromFile(fileName, fmt)) { + SettingsCache::instance().recents().updateRecentlyOpenedDeckPaths(fileName); if (deckOpenLocation == NEW_TAB) { emit openDeckEditor(l); } else {