summaryrefslogtreecommitdiffstats
path: root/gui/pages.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--gui/pages.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/gui/pages.cpp b/gui/pages.cpp
index def262998..c45566232 100644
--- a/gui/pages.cpp
+++ b/gui/pages.cpp
@@ -64,7 +64,6 @@ extern std::vector<std::string> gConsoleColor;
std::map<std::string, PageSet*> PageManager::mPageSets;
PageSet* PageManager::mCurrentSet;
-PageSet* PageManager::mBaseSet = NULL;
MouseCursor *PageManager::mMouseCursor = NULL;
HardwareKeyboard *PageManager::mHardwareKeyboard = NULL;
bool PageManager::mReloadTheme = false;
@@ -1421,10 +1420,6 @@ int PageManager::LoadPackage(std::string name, std::string package, std::string
LOGERR("Package %s failed to load.\n", name.c_str());
}
- // The first successful package we loaded is the base
- if (mBaseSet == NULL)
- mBaseSet = mCurrentSet;
-
mCurrentSet = pageSet;
if (pZip) {
@@ -1500,8 +1495,6 @@ int PageManager::ReloadPackage(std::string name, std::string package)
}
if (mCurrentSet == set)
SelectPackage(name);
- if (mBaseSet == set)
- mBaseSet = mCurrentSet;
delete set;
GUIConsole::Translate_Now();
return 0;
@@ -1518,6 +1511,8 @@ void PageManager::ReleasePackage(std::string name)
PageSet* set = (*iter).second;
mPageSets.erase(iter);
delete set;
+ if (set == mCurrentSet)
+ mCurrentSet = NULL;
return;
}