(svn r23649) -Fix [FS#4905) (r23634): loading a savegame with an empty GSTR chunk caused assert

This commit is contained in:
truebrain 2011-12-21 12:40:29 +00:00
parent e1f04b89c3
commit 5f7268cbdc

View File

@ -158,6 +158,13 @@ static void Load_GSTR()
*_current_data->raw_strings.Append() = ls;
}
/* If there were no strings in the savegame, set GameStrings to NULL */
if (_current_data->raw_strings.Length() == 0) {
delete _current_data;
_current_data = NULL;
return;
}
_current_data->Compile();
ReconsiderGameScriptLanguage();
}