diff options
Diffstat (limited to 'src/wasm/wasm-binary.cpp')
-rw-r--r-- | src/wasm/wasm-binary.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp index c1e506c8e..d72626b90 100644 --- a/src/wasm/wasm-binary.cpp +++ b/src/wasm/wasm-binary.cpp @@ -1411,9 +1411,9 @@ void WasmBinaryWriter::writeDebugLocation(Expression* curr, Function* func) { if (sourceMap) { auto& debugLocations = func->debugLocations; auto iter = debugLocations.find(curr); - if (iter != debugLocations.end()) { + if (iter != debugLocations.end() && iter->second) { // There is debug information here, write it out. - writeDebugLocation(iter->second); + writeDebugLocation(*(iter->second)); } else { // This expression has no debug location. writeNoDebugLocation(); |