diff options
author | truebrain <truebrain@openttd.org> | 2011-12-21 12:40:29 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-12-21 12:40:29 +0000 |
commit | 5f7268cbdc8a3d7c5f0a548f3b71185b6562bc4f (patch) | |
tree | 2db8a7115a0d636543c7df6e9c2c2741f421bc59 /src | |
parent | e1f04b89c3e39a945c61caa4a80b79a83ad19e90 (diff) | |
download | openttd-5f7268cbdc8a3d7c5f0a548f3b71185b6562bc4f.tar.xz |
(svn r23649) -Fix [FS#4905) (r23634): loading a savegame with an empty GSTR chunk caused assert
Diffstat (limited to 'src')
-rw-r--r-- | src/saveload/game_sl.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/saveload/game_sl.cpp b/src/saveload/game_sl.cpp index 6b93a46ea..91b108c56 100644 --- a/src/saveload/game_sl.cpp +++ b/src/saveload/game_sl.cpp @@ -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(); } |