- fixed crash with bad state labels.

This commit is contained in:
Christoph Oelckers 2017-02-16 21:51:32 +01:00
parent 1d52037779
commit b523aa13c8
1 changed files with 1 additions and 1 deletions

View File

@ -1530,7 +1530,7 @@ FxExpression *FxTypeCast::Resolve(FCompileContext &ctx)
SAFE_RESOLVE(basex, ctx);
// first deal with the simple types
if (ValueType == TypeError || basex->ValueType == TypeError)
if (ValueType == TypeError || basex->ValueType == TypeError || basex->ValueType == nullptr)
{
ScriptPosition.Message(MSG_ERROR, "Trying to cast to invalid type.");
delete this;