diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 188a233b5..efaf1125c 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -40,6 +40,7 @@ public: try { cc->gameModel->SetSave(cc->search->GetLoadedSave()); + cc->search->ReleaseLoadedSave(); } catch(GameModelException & ex) { diff --git a/src/search/SearchController.cpp b/src/search/SearchController.cpp index 7930b6545..44ff68148 100644 --- a/src/search/SearchController.cpp +++ b/src/search/SearchController.cpp @@ -55,6 +55,11 @@ SaveInfo * SearchController::GetLoadedSave() return searchModel->GetLoadedSave(); } +void SearchController::ReleaseLoadedSave() +{ + searchModel->SetLoadedSave(NULL); +} + void SearchController::Update() { if(!nextQueryDone && nextQueryTime < clock()) diff --git a/src/search/SearchController.h b/src/search/SearchController.h index 66d464a3c..03967b411 100644 --- a/src/search/SearchController.h +++ b/src/search/SearchController.h @@ -44,6 +44,7 @@ public: void RemoveSelected(); void UnpublishSelected(); void FavouriteSelected(); + void ReleaseLoadedSave(); SaveInfo * GetLoadedSave(); };