From ab6d565492d886e071b422a62627f58447647a5e Mon Sep 17 00:00:00 2001 From: Thulinma Date: Thu, 21 Sep 2023 10:37:36 +0200 Subject: [PATCH] Fix segfault in info websocket when requesting information on a stream that is online yet could not be opened --- src/output/output_http_internal.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/output/output_http_internal.cpp b/src/output/output_http_internal.cpp index 71e8059a..a8497e8d 100644 --- a/src/output/output_http_internal.cpp +++ b/src/output/output_http_internal.cpp @@ -399,7 +399,7 @@ namespace Mist{ streamName + "\").addEventListener(\"initialized\",f);"; } } - + H.Clean(); H.SetHeader("Content-Type", "text/html"); H.SetHeader("X-UA-Compatible", "IE=edge"); @@ -498,7 +498,7 @@ namespace Mist{ return json_resp; } initialize(); - if (!myConn){return json_resp;} + if (!myConn || !M){return json_resp;} json_resp["selver"] = 2; @@ -1071,10 +1071,10 @@ namespace Mist{ H.Clean(); return; } - + #include "player_hlsjs.js.h" response.append((char*)player_hlsjs_js, (size_t)player_hlsjs_js_len); - + H.SetBody(response); H.SendResponse("200", "OK", myConn); H.Clean(); @@ -1099,7 +1099,7 @@ namespace Mist{ H.SendResponse("200", "OK", myConn); H.Clean(); return; - } + } } void OutHTTP::sendIcon(bool headersOnly){