diff options
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-ir-obfuscate-loc.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/slang/slang-ir-obfuscate-loc.cpp b/source/slang/slang-ir-obfuscate-loc.cpp index 9aef6f6a6..79497e7a3 100644 --- a/source/slang/slang-ir-obfuscate-loc.cpp +++ b/source/slang/slang-ir-obfuscate-loc.cpp @@ -68,6 +68,11 @@ SlangResult obfuscateModuleLocs(IRModule* module, SourceManager* sourceManager) // Find all of the instructions with source locs _findInstsRec(module->getModuleInst(), instWithLocs); + if (instWithLocs.getCount() == 0) + { + // Nothing to do + return SLANG_OK; + } // Sort them instWithLocs.sort(); @@ -233,8 +238,8 @@ SlangResult obfuscateModuleLocs(IRModule* module, SourceManager* sourceManager) } // We can now just set all the new locs in the instructions + if(const LocPair* curPair = locPairs.getBuffer()) { - const LocPair* curPair = locPairs.getBuffer(); LocPair pair = *curPair; for (const auto& instWithLoc : instWithLocs) |
