From 13115ad21775a2237ea7e5081bd216f4e75dd0ad Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 8 Oct 2019 01:37:43 +0200 Subject: [PATCH] - another crash in Blood --- source/glbackend/gl_palmanager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/glbackend/gl_palmanager.cpp b/source/glbackend/gl_palmanager.cpp index a471fbcd3..7c8261e4a 100644 --- a/source/glbackend/gl_palmanager.cpp +++ b/source/glbackend/gl_palmanager.cpp @@ -122,6 +122,7 @@ unsigned PaletteManager::FindPalette(const uint8_t *paldata) unsigned PaletteManager::FindPalswap(const uint8_t* paldata) { + if (paldata == nullptr) return 0; auto crc32 = CalcCRC32(paldata, 256 * numshades); for (unsigned int i = 0; i < palswaps.Size(); i++) {