1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-06 00:13:33 +00:00

Fixed possible NULL dereference

This commit is contained in:
Bryan Roe
2021-08-09 11:31:32 -07:00
parent 3fc9a1fb1a
commit 6b510cf886

View File

@@ -3423,6 +3423,7 @@ void ILibDuktape_HttpStream_OnReceive(ILibWebClient_StateObject WebStateObject,
{
// We're on the Chain Thread, so we can directly emit the 'end' event
data->bodyStream = NULL;
if (data->DS == NULL) { return; }
duk_push_heapptr(ctx, data->DS->ParentObject); // [httpStream]
duk_get_prop_string(ctx, -1, "emit"); // [httpStream][emit]