From 8a4b765c9c7963160ed7330227d12e3ec8bd54fc Mon Sep 17 00:00:00 2001 From: Norihiro Kamae Date: Sun, 22 May 2022 09:00:13 +0900 Subject: [PATCH] libobs: Fix rendering null sprite When rendering an async-source that does not have a frame yet, massive error `A sprite cannot be drawn without a width/height` was logged. --- libobs/obs-source.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libobs/obs-source.c b/libobs/obs-source.c index 2dddba7fb..dc853612d 100644 --- a/libobs/obs-source.c +++ b/libobs/obs-source.c @@ -2329,6 +2329,9 @@ static inline void obs_source_draw_texture(struct obs_source *source, if (source->async_texrender) tex = gs_texrender_get_texture(source->async_texrender); + if (!tex) + return; + param = gs_effect_get_param_by_name(effect, "image"); const bool linear_srgb = gs_get_linear_srgb();