From 95b1e81ee59bf8a49bd4c0ba55634565b9f58062 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Tue, 28 May 2019 02:51:05 +0200 Subject: [PATCH] filter-dynamic-mask: Don't crash if a texture is missing When copying or re-ordering filters, an occasional crash can be observed due to the rendering not being possible yet. With this, it will simply revert back to the original source instead of crashing. --- source/filters/filter-dynamic-mask.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/filters/filter-dynamic-mask.cpp b/source/filters/filter-dynamic-mask.cpp index 396d5ba0..9668c58d 100644 --- a/source/filters/filter-dynamic-mask.cpp +++ b/source/filters/filter-dynamic-mask.cpp @@ -477,6 +477,10 @@ void filter::dynamic_mask::dynamic_mask_instance::video_render(gs_effect_t* in_e obs_source_skip_video_filter(this->self); return; } + if (!this->filter_texture->get_object() || !this->input_texture->get_object() || !this->final_texture->get_object()) { + obs_source_skip_video_filter(this->self); + return; + } // Draw source {