fixed potential nullptr dereference.

This commit is contained in:
Christoph Oelckers 2023-11-19 07:21:49 +01:00
parent 11f2fc10ea
commit eaf43dfb96

View file

@ -1659,7 +1659,8 @@ PClassPointer::PClassPointer(PClass *restrict)
loadOp = OP_LP;
storeOp = OP_SP;
Flags |= TYPE_ClassPointer;
mVersion = restrict->VMType->mVersion;
if (restrict) mVersion = restrict->VMType->mVersion;
else mVersion = 0;
}
//==========================================================================