Skip to content

Commit 1a91fbc

Browse files
author
Mihail Slavchev
committed
bug fix
1 parent 33328ec commit 1a91fbc

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/jni/ObjectManager.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -636,8 +636,12 @@ void ObjectManager::OnGcFinished(GCType type, GCCallbackFlags flags)
636636
}
637637
for (const auto& kv : m_implObjStrong)
638638
{
639-
auto obj = Local<Object>::New(isolate, *kv.second);
640-
MarkReachableObjects(isolate, obj);
639+
Persistent<Object> *po = kv.second;
640+
if (po != nullptr)
641+
{
642+
auto obj = Local<Object>::New(isolate, *po);
643+
MarkReachableObjects(isolate, obj);
644+
}
641645
}
642646

643647
ReleaseRegularObjects();

0 commit comments

Comments
 (0)