diff --git a/src/scripting/vm/vmbuilder.cpp b/src/scripting/vm/vmbuilder.cpp index 46553ab72..19fe81c32 100644 --- a/src/scripting/vm/vmbuilder.cpp +++ b/src/scripting/vm/vmbuilder.cpp @@ -281,8 +281,8 @@ unsigned VMFunctionBuilder::GetConstantAddress(void *ptr, VM_ATAG tag) AddrKonst *locp = AddressConstantMap.CheckKey(ptr); if (locp != NULL) { - // There should only be one tag associated with a memory location. - assert(locp->Tag == tag); + // There should only be one tag associated with a memory location. Exceptions are made for null pointers that got allocated through constant arrays. + assert(ptr == nullptr || locp->Tag == tag); return locp->KonstNum; } else diff --git a/src/v_draw.cpp b/src/v_draw.cpp index 8c66c3d38..a12b27bfc 100644 --- a/src/v_draw.cpp +++ b/src/v_draw.cpp @@ -523,8 +523,6 @@ bool DCanvas::ParseDrawTextureTags (FTexture *img, double x, double y, DWORD tag // doubles when passed as function arguments.) while (tag != TAG_DONE) { - DWORD data; - switch (tag) { default: