From 952e04466a18e9d03fcb018ce9213f34b93ca74a Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 10 May 2023 19:27:47 -0700 Subject: Fix intellisense and autodiff crashes. (#2879) * Fix intellisense crash. * Fix a bug in updateElement simplification. * cleanup. --------- Co-authored-by: Yong He --- source/slang/slang-syntax.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/slang/slang-syntax.h') diff --git a/source/slang/slang-syntax.h b/source/slang/slang-syntax.h index 3ac258f08..52df3a0e0 100644 --- a/source/slang/slang-syntax.h +++ b/source/slang/slang-syntax.h @@ -194,6 +194,8 @@ namespace Slang inline Type* getType(ASTBuilder* astBuilder, SubstExpr expr) { + if (!expr) + return astBuilder->getErrorType(); return substituteType(expr.getSubsts(), astBuilder, expr.getExpr()->type); } -- cgit v1.2.3