summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-syntax.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2021-04-16 10:34:26 -0700
committerGitHub <noreply@github.com>2021-04-16 10:34:26 -0700
commit79e92395f8ce3d92c446e3bb3250d19ce33decd5 (patch)
tree2ac277fa299200da72cf03a2b5b96338f66aee5d /source/slang/slang-syntax.cpp
parentbad484d838590d0a2aaf1b5b8ac820634af2decb (diff)
Update `model-viewer` example and fixing compiler bugs. (#1795)
Diffstat (limited to 'source/slang/slang-syntax.cpp')
-rw-r--r--source/slang/slang-syntax.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/slang/slang-syntax.cpp b/source/slang/slang-syntax.cpp
index accbdb27e..d5f2c13db 100644
--- a/source/slang/slang-syntax.cpp
+++ b/source/slang/slang-syntax.cpp
@@ -30,7 +30,10 @@ void printDiagnosticArg(StringBuilder& sb, Val* val)
void printDiagnosticArg(StringBuilder& sb, TypeExp const& type)
{
- type.type->toText(sb);
+ if (type.type)
+ type.type->toText(sb);
+ else
+ sb << "<null>";
}
void printDiagnosticArg(StringBuilder& sb, QualType const& type)