summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-02-05 20:18:30 +0000
committerrubidium <rubidium@openttd.org>2010-02-05 20:18:30 +0000
commita126db6ea4e9e5ca418b5a49b8e3fae8fbbd8ab9 (patch)
treedb1985a32b72a5b27492e96a0ca67d6e09d60648 /src/saveload
parent0c226b44a3d78b7f8fd30c8a6c6dbd15af43fdd8 (diff)
downloadopenttd-a126db6ea4e9e5ca418b5a49b8e3fae8fbbd8ab9.tar.xz
(svn r19021) -Fix [FS#3570]: don't NULL the pointers when saving the savegame on an error during saving; the savegame is still valid
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/saveload.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp
index d6b83a794..e41213556 100644
--- a/src/saveload/saveload.cpp
+++ b/src/saveload/saveload.cpp
@@ -199,7 +199,7 @@ static void NORETURN SlError(StringID string, const char *extra_msg = NULL)
* the pointers are actually filled with indices, which means that
* when we access them during cleaning the pool dereferences of
* those indices will be made with segmentation faults as result. */
- SlNullPointers();
+ if (_sl.action == SLA_LOAD || _sl.action == SLA_PTRS) SlNullPointers();
throw std::exception();
}