summaryrefslogtreecommitdiffstats
path: root/games/pioneer/save-compat.diff
blob: db0f5f247cebb2e41fcf926cc80b899a6b7fe7b3 (plain)
--- src/lua/LuaSerializer.cpp.orig	2024-03-16 10:23:00.037921901 +0900
+++ src/lua/LuaSerializer.cpp	2024-03-16 10:24:18.622366095 +0900
@@ -413,6 +413,10 @@
 	lua_State *l = Lua::manager->GetLuaState();
 	LUA_DEBUG_START(l);
 
+	// Old savefile with no persistent table.
+	if (!json.count("lua_persistent_json"))
+		return;
+
 	const Json &persist = json["lua_persistent_json"];
 
 	luaL_getsubtable(l, LUA_REGISTRYINDEX, NS_REFTABLE);