diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index 73fec9e0..74a780aa 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -292,6 +292,11 @@ void Game::init(void) const char* pKey = pElem->Value(); const char* pText = pElem->GetText() ; + if (pText == NULL) + { + pText = ""; + } + if (SDL_strcmp(pKey, "summary") == 0) { quicksummary = pText; @@ -332,6 +337,11 @@ void Game::init(void) const char* pKey = pElem->Value(); const char* pText = pElem->GetText() ; + if (pText == NULL) + { + pText = ""; + } + if (SDL_strcmp(pKey, "summary") == 0) { telesummary = pText; @@ -4016,6 +4026,11 @@ void Game::loadstats(ScreenSettings* screen_settings) const char* pKey = pElem->Value(); const char* pText = pElem->GetText() ; + if (pText == NULL) + { + pText = ""; + } + LOAD_ARRAY(unlock) LOAD_ARRAY(unlocknotify) @@ -4073,6 +4088,11 @@ void Game::deserializesettings(tinyxml2::XMLElement* dataNode, ScreenSettings* s const char* pKey = pElem->Value(); const char* pText = pElem->GetText(); + if (pText == NULL) + { + pText = ""; + } + if (SDL_strcmp(pKey, "fullscreen") == 0) { screen_settings->fullscreen = help.Int(pText); @@ -5132,6 +5152,11 @@ void Game::loadsummary(void) const char* pKey = pElem->Value(); const char* pText = pElem->GetText() ; + if (pText == NULL) + { + pText = ""; + } + if (SDL_strcmp(pKey, "summary") == 0) { telesummary = pText; @@ -5209,6 +5234,11 @@ void Game::loadsummary(void) const char* pKey = pElem->Value(); const char* pText = pElem->GetText() ; + if (pText == NULL) + { + pText = ""; + } + if (SDL_strcmp(pKey, "summary") == 0) { quicksummary = pText;