1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-01-06 10:34:09 +00:00

Fixed potential crash in WebRTC finalizer

This commit is contained in:
Bryan Roe
2020-04-14 16:13:47 -07:00
parent 5fd96b36c3
commit 255d20c263

View File

@@ -226,7 +226,7 @@ duk_ret_t ILibDuktape_WebRTC_ConnectionFactory_Finalizer(duk_context *ctx)
//printf("WebRTC Factory Finalizer: %p\n", factory);
if (factory != NULL && ILibIsChainBeingDestroyed(chain) == 0)
if (factory != NULL && chain != NULL && ILibIsChainBeingDestroyed(chain) == 0)
{
ILibWrapper_WebRTC_ConnectionFactory_RemoveFromChain(factory);
}