summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang-ir.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp
index 92da981ad..dd3034da1 100644
--- a/source/slang/slang-ir.cpp
+++ b/source/slang/slang-ir.cpp
@@ -6889,6 +6889,8 @@ namespace Slang
SLANG_ASSERT(other);
if (other->getPrevInst() == this)
return;
+ if (other == this)
+ return;
_insertAt(other->getPrevInst(), other, other->getParent());
}