summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2017-11-04 16:54:44 -0400
committerYong He <yonghe@outlook.com>2017-11-04 16:54:44 -0400
commitcb0a5773cd3b3564c4a19b85aaddd3d9cc63a3c7 (patch)
tree028947d43e1fda2ee911b9afc04208e8ebe20f42 /source
parent31e7f84484d227206f3bbb33a8b9be8a9acecfe5 (diff)
bug fix
Diffstat (limited to 'source')
-rw-r--r--source/slang/lower.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/slang/lower.cpp b/source/slang/lower.cpp
index bdd041f71..7f18659ae 100644
--- a/source/slang/lower.cpp
+++ b/source/slang/lower.cpp
@@ -2572,7 +2572,8 @@ struct LoweringVisitor
else if (auto thisSubst = dynamic_cast<ThisTypeSubstitution*>(inSubstitutions))
{
RefPtr<ThisTypeSubstitution> result = new ThisTypeSubstitution();
- result->sourceType = translateVal(result->sourceType);
+ if (result->sourceType)
+ result->sourceType = translateVal(result->sourceType);
return result;
}
return nullptr;