diff options
Diffstat (limited to 'source/slang/ir-validate.cpp')
| -rw-r--r-- | source/slang/ir-validate.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/slang/ir-validate.cpp b/source/slang/ir-validate.cpp index 1e36322f4..7c04c0873 100644 --- a/source/slang/ir-validate.cpp +++ b/source/slang/ir-validate.cpp @@ -75,6 +75,16 @@ namespace Slang auto instParent = inst->getParent(); auto operandValue = operandUse->get(); + + if( !operandValue ) + { + // A null operand should almost always be an error, but + // we currently have a few cases where this arises. + // + // TODO: plug the leaks. + return; + } + auto operandParent = operandValue->getParent(); if (auto instParentBlock = as<IRBlock>(instParent)) |
