diff options
Diffstat (limited to 'source/slang/emit.cpp')
| -rw-r--r-- | source/slang/emit.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp index 0b79cb52f..79a8277bf 100644 --- a/source/slang/emit.cpp +++ b/source/slang/emit.cpp @@ -1491,12 +1491,15 @@ static void EmitType(EmitContext* context, RefPtr<ExpressionType> type) static void EmitType(EmitContext* context, TypeExp const& typeExp, Token const& nameToken) { EmitType(context, typeExp.type, - typeExp.exp ? typeExp.exp->Position : CodePosition(), nameToken.Content, nameToken.Position); + typeExp.exp ? typeExp.exp->Position : CodePosition(), + nameToken.Content, nameToken.Position); } static void EmitType(EmitContext* context, TypeExp const& typeExp, String const& name) { - EmitType(context, typeExp.type, typeExp.exp->Position, name, CodePosition()); + EmitType(context, typeExp.type, + typeExp.exp ? typeExp.exp->Position : CodePosition(), + name, CodePosition()); } // Statements |
