From 1cb8b3fc6bb248ca228caae1d2e354cb235201ee Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 20 Feb 2023 20:22:07 +0000 Subject: [PATCH] Prevent SW crashing when saving game it was trying to save the crosshair actor's "User" data, which it doesn't need to --- source/games/sw/src/save.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/games/sw/src/save.cpp b/source/games/sw/src/save.cpp index 8e9ceaac0..4512d2356 100644 --- a/source/games/sw/src/save.cpp +++ b/source/games/sw/src/save.cpp @@ -1088,7 +1088,9 @@ void DSWActor::Serialize(FSerializer& arc) ("owner", ownerActor) ("texparam", texparam) ("texparam2", texparam2); - if (hasUser) arc("user", user); // only write if defined. + + //Bit of a fiddle, but don't call this for the crosshair actor - seems to have solved the crashing + if (hasUser && (link_stat != STAT_CROSSHAIR)) arc("user", user); // only write if defined. } //---------------------------------------------------------------------------