From ecd7e324dd44c87d71d504614236a6a2fd2f649f Mon Sep 17 00:00:00 2001 From: Thulinma Date: Mon, 22 Jul 2024 12:48:48 +0200 Subject: [PATCH] Fix segfault in HTTP output when attempting to start a stream without source config --- lib/stream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/stream.cpp b/lib/stream.cpp index b470446b..01aed5e1 100644 --- a/lib/stream.cpp +++ b/lib/stream.cpp @@ -576,7 +576,7 @@ bool Util::startInput(std::string streamname, std::string filename, bool forkFir // Only use configured source if not manually overridden. Abort if no config is available. if (!filename.size()){ - if (!stream_cfg){ + if (!stream_cfg || !stream_cfg.isMember("source") || !stream_cfg["source"].isString() || !stream_cfg["source"]){ MEDIUM_MSG("Stream %s not configured, no source manually given, cannot start", streamname.c_str()); return false; }