Cleanup in MWGui::WindowManager constructor initialzation list.

Corrected order of initialization list, and added missing
member field initializations - without this openmw crashes when
installer is interrupted and there are no valid data path
in openmw.cfg, as reported by BrotherBrick in:

https://forum.openmw.org/viewtopic.php?f=20&p=19501#p19499

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
actorid
Lukasz Gromanowski 11 years ago
parent 1363e86828
commit 5ce1f50fab

@ -61,20 +61,23 @@ namespace MWGui
const Compiler::Extensions& extensions, int fpsLevel, OEngine::Render::OgreRenderer *ogre, const Compiler::Extensions& extensions, int fpsLevel, OEngine::Render::OgreRenderer *ogre,
const std::string& logpath, const std::string& cacheDir, bool consoleOnlyScripts, const std::string& logpath, const std::string& cacheDir, bool consoleOnlyScripts,
Translation::Storage& translationDataStorage, ToUTF8::FromType encoding) Translation::Storage& translationDataStorage, ToUTF8::FromType encoding)
: mGuiManager(NULL) : mConsoleOnlyScripts(consoleOnlyScripts)
, mConsoleOnlyScripts(consoleOnlyScripts) , mGuiManager(NULL)
, mRendering(ogre) , mRendering(ogre)
, mHud(NULL) , mHud(NULL)
, mMap(NULL) , mMap(NULL)
, mMenu(NULL) , mMenu(NULL)
, mStatsWindow(NULL)
, mToolTips(NULL) , mToolTips(NULL)
, mStatsWindow(NULL)
, mMessageBoxManager(NULL) , mMessageBoxManager(NULL)
, mConsole(NULL) , mConsole(NULL)
, mJournal(NULL) , mJournal(NULL)
, mDialogueWindow(NULL) , mDialogueWindow(NULL)
, mBookWindow(NULL) , mContainerWindow(NULL)
, mDragAndDrop(NULL)
, mInventoryWindow(NULL)
, mScrollWindow(NULL) , mScrollWindow(NULL)
, mBookWindow(NULL)
, mCountDialog(NULL) , mCountDialog(NULL)
, mTradeWindow(NULL) , mTradeWindow(NULL)
, mSpellBuyingWindow(NULL) , mSpellBuyingWindow(NULL)
@ -83,27 +86,37 @@ namespace MWGui
, mConfirmationDialog(NULL) , mConfirmationDialog(NULL)
, mAlchemyWindow(NULL) , mAlchemyWindow(NULL)
, mSpellWindow(NULL) , mSpellWindow(NULL)
, mQuickKeysMenu(NULL)
, mLoadingScreen(NULL) , mLoadingScreen(NULL)
, mCharGen(NULL)
, mLevelupDialog(NULL) , mLevelupDialog(NULL)
, mWaitDialog(NULL) , mWaitDialog(NULL)
, mSpellCreationDialog(NULL) , mSpellCreationDialog(NULL)
, mEnchantingDialog(NULL) , mEnchantingDialog(NULL)
, mTrainingWindow(NULL) , mTrainingWindow(NULL)
, mMerchantRepair(NULL) , mMerchantRepair(NULL)
, mRepair(NULL)
, mSoulgemDialog(NULL) , mSoulgemDialog(NULL)
, mRepair(NULL)
, mCompanionWindow(NULL) , mCompanionWindow(NULL)
, mTranslationDataStorage (translationDataStorage)
, mSoftwareCursor(NULL)
, mCharGen(NULL)
, mInputBlocker(NULL)
, mCrosshairEnabled(Settings::Manager::getBool ("crosshair", "HUD"))
, mSubtitlesEnabled(Settings::Manager::getBool ("subtitles", "GUI"))
, mHudEnabled(true)
, mCursorVisible(true)
, mPlayerName() , mPlayerName()
, mPlayerRaceId() , mPlayerRaceId()
, mPlayerAttributes() , mPlayerAttributes()
, mPlayerMajorSkills()
, mPlayerMinorSkills() , mPlayerMinorSkills()
, mPlayerMajorSkills()
, mPlayerSkillValues() , mPlayerSkillValues()
, mPlayerHealth() , mPlayerHealth()
, mPlayerMagicka() , mPlayerMagicka()
, mPlayerFatigue() , mPlayerFatigue()
, mGui(NULL) , mGui(NULL)
, mGuiModes()
, mCursorManager(NULL)
, mGarbageDialogs() , mGarbageDialogs()
, mShown(GW_ALL) , mShown(GW_ALL)
, mForceHidden(GW_None) , mForceHidden(GW_None)
@ -113,13 +126,7 @@ namespace MWGui
, mFPS(0.0f) , mFPS(0.0f)
, mTriangleCount(0) , mTriangleCount(0)
, mBatchCount(0) , mBatchCount(0)
, mCrosshairEnabled(Settings::Manager::getBool ("crosshair", "HUD"))
, mSubtitlesEnabled(Settings::Manager::getBool ("subtitles", "GUI"))
, mHudEnabled(true)
, mTranslationDataStorage (translationDataStorage)
, mCursorManager(NULL)
, mUseHardwareCursors(Settings::Manager::getBool("hardware cursors", "GUI")) , mUseHardwareCursors(Settings::Manager::getBool("hardware cursors", "GUI"))
, mCursorVisible(true)
{ {
// Set up the GUI system // Set up the GUI system
mGuiManager = new OEngine::GUI::MyGUIManager(mRendering->getWindow(), mRendering->getScene(), false, logpath); mGuiManager = new OEngine::GUI::MyGUIManager(mRendering->getWindow(), mRendering->getScene(), false, logpath);

Loading…
Cancel
Save