diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index c3765ad6b7..bd84d97fdd 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1659,6 +1659,11 @@ private: { rct1_unk_sprite* src = &sprite.unknown; SpriteGeneric* dst = reinterpret_cast(create_sprite(SPRITE_IDENTIFIER_MISC)); + if (dst == nullptr) + { + log_warning("SV4 has too many misc entities. No more misc entities will be imported!"); + break; + } dst->sprite_identifier = src->sprite_identifier; dst->type = src->type; dst->flags = src->flags;