diff options
Diffstat (limited to 'src/ir/module-utils.cpp')
-rw-r--r-- | src/ir/module-utils.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ir/module-utils.cpp b/src/ir/module-utils.cpp index e169f0ff1..99652ceff 100644 --- a/src/ir/module-utils.cpp +++ b/src/ir/module-utils.cpp @@ -60,7 +60,9 @@ Function* copyFunction(Function* func, // Update file indices if needed if (fileIndexMap) { for (auto& iter : ret->debugLocations) { - iter.second.fileIndex = (*fileIndexMap)[iter.second.fileIndex]; + if (iter.second) { + iter.second->fileIndex = (*fileIndexMap)[iter.second->fileIndex]; + } } updateLocationSet(ret->prologLocation, *fileIndexMap); updateLocationSet(ret->epilogLocation, *fileIndexMap); |