Skip to content

Commit 7dc2e67

Browse files
Re-check for existance of syncblock in HasInteropInfo - in case the syncblock is gone. (#94649)
Co-authored-by: vsadov <8218165+VSadov@users.noreply.github.com>
1 parent 64c1856 commit 7dc2e67

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/coreclr/vm/weakreferencenative.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,7 @@ FCIMPL1(FC_BOOL_RET, ComAwareWeakReferenceNative::HasInteropInfo, Object* pObjec
172172
_ASSERTE(pObject != nullptr);
173173

174174
SyncBlock* pSyncBlock = pObject->PassiveGetSyncBlock();
175-
_ASSERTE(pSyncBlock != nullptr);
176-
return pSyncBlock->GetInteropInfoNoCreate() != nullptr;
175+
return pSyncBlock != nullptr && pSyncBlock->GetInteropInfoNoCreate() != nullptr;
177176
}
178177
FCIMPLEND
179178

0 commit comments

Comments
 (0)