Skip to content

Commit 6f65ff1

Browse files
committed
Check for nullptr before dereferencing pointer.
1 parent bdfe63d commit 6f65ff1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/Runtime/ByteCode/ScopeInfo.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ namespace Js
8484
scopeInfo->hasLocalInClosure = scope->GetHasOwnLocalInClosure();
8585

8686
TRACE_BYTECODE(_u("\nSave ScopeInfo: %s parent: %s #symbols: %d %s\n"),
87-
scope->GetFunc()->name, parent->GetDisplayName(), count, scopeInfo->isObject ? _u("isObject") : _u(""));
87+
scope->GetFunc()->name, parent ? parent->GetDisplayName() : _u(""), count,
88+
scopeInfo->isObject ? _u("isObject") : _u(""));
8889

8990
MapSymbolData mapSymbolData = { byteCodeGenerator, scope->GetFunc(), 0 };
9091
scope->ForEachSymbol([&mapSymbolData, scopeInfo, scope](Symbol * sym)

0 commit comments

Comments
 (0)