summaryrefslogtreecommitdiff
path: root/source/slang/slang-syntax.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-syntax.cpp')
-rw-r--r--source/slang/slang-syntax.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/slang/slang-syntax.cpp b/source/slang/slang-syntax.cpp
index b6fd8936e..0b92d07af 100644
--- a/source/slang/slang-syntax.cpp
+++ b/source/slang/slang-syntax.cpp
@@ -25,6 +25,8 @@ void printDiagnosticArg(StringBuilder& sb, Decl* decl)
void printDiagnosticArg(StringBuilder& sb, DeclRefBase* declRefBase)
{
+ if (!declRefBase)
+ return;
printDiagnosticArg(sb, declRefBase->getDecl());
}