From 42c9375333aa27353abc24387cc91fa9576532d7 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Fri, 14 Feb 2020 07:29:31 +0100 Subject: [PATCH] obs-tools: Fix obs::tools::child_source not checking return value --- source/obs/obs-tools.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/obs/obs-tools.cpp b/source/obs/obs-tools.cpp index 0e27fea..5676db9 100644 --- a/source/obs/obs-tools.cpp +++ b/source/obs/obs-tools.cpp @@ -183,7 +183,9 @@ bool obs::tools::obs_properties_remove_by_name(obs_properties_t* props, const ch obs::tools::child_source::child_source(obs_source_t* parent, std::shared_ptr child) : _parent(parent), _child(child) { - obs_source_add_active_child(_parent, _child.get()); + if (!obs_source_add_active_child(_parent, _child.get())) { + throw std::runtime_error("recursion detected"); + } } obs::tools::child_source::~child_source()