|
|
@@ -8148,7 +8148,8 @@ void asCCompiler::CompileConversion(asCScriptNode *node, asSExprContext *ctx)
|
|
|
// here we'll only treat those conversions that require an explicit cast.
|
|
|
|
|
|
bool conversionOK = false;
|
|
|
- if( !expr.type.isConstant )
|
|
|
+ // Urho3D: check for void before attempting to compile the cast
|
|
|
+ if( !expr.type.isConstant && expr.type.dataType.GetTokenType() != ttVoid )
|
|
|
{
|
|
|
if( !expr.type.dataType.IsObject() )
|
|
|
ConvertToTempVariable(&expr);
|