diff --git a/microscript/ILibDuktape_HttpStream.c b/microscript/ILibDuktape_HttpStream.c index 7617b01..f94a0f8 100644 --- a/microscript/ILibDuktape_HttpStream.c +++ b/microscript/ILibDuktape_HttpStream.c @@ -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]