summaryrefslogtreecommitdiffstats
path: root/source/slang/emit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/emit.cpp')
-rw-r--r--source/slang/emit.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp
index 01b3e8cc2..155e1e39a 100644
--- a/source/slang/emit.cpp
+++ b/source/slang/emit.cpp
@@ -2159,6 +2159,11 @@ struct EmitVisitor
void EmitStmt(RefPtr<StatementSyntaxNode> stmt)
{
+ // TODO(tfoley): this shouldn't occur, but sometimes
+ // lowering will get confused by an empty function body...
+ if (!stmt)
+ return;
+
// Try to ensure that debugging can find the right location
advanceToSourceLocation(stmt->Position);