diff --git a/source/core/maploader.cpp b/source/core/maploader.cpp index ed186cc8a..71da91c7e 100644 --- a/source/core/maploader.cpp +++ b/source/core/maploader.cpp @@ -284,7 +284,8 @@ void validateSprite(spritetype& spr, int sectnum, int index) spr.statnum = MAXSTATUS; sectnum = -1; } - spr.sectp = §or[sectnum]; + if (sectnum >= 0) spr.sectp = §or[sectnum]; + else spr.sectp = nullptr; } static void ReadSpriteV7(FileReader& fr, spritetype& spr, int& secno)