- atags for null pointers have no meaning so do not assert on them.

This commit is contained in:
Christoph Oelckers 2017-02-04 19:36:39 +01:00
parent e8c2444ddd
commit a102807737
2 changed files with 2 additions and 4 deletions

View File

@ -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

View File

@ -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: