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.
This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2019-05-28 02:51:05 +02:00
parent ccc4c6ea22
commit 95b1e81ee5

View file

@ -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); obs_source_skip_video_filter(this->self);
return; 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 // Draw source
{ {