From 65094eefe442b107fcae2e0d3e2c8ddd1b9b7802 Mon Sep 17 00:00:00 2001 From: Richard Stanway Date: Thu, 21 Apr 2016 00:21:07 +0200 Subject: [PATCH] libobs: Don't try to keep rendering if a texture wasn't allocated Fixes issues with invalid textures causing huge output or large black regions to be rendered. --- libobs/graphics/texture-render.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libobs/graphics/texture-render.c b/libobs/graphics/texture-render.c index 6789f0169..2e5410e98 100644 --- a/libobs/graphics/texture-render.c +++ b/libobs/graphics/texture-render.c @@ -99,6 +99,9 @@ bool gs_texrender_begin(gs_texrender_t *texrender, uint32_t cx, uint32_t cy) if (!texrender_resetbuffer(texrender, cx, cy)) return false; + if (!texrender->target) + return false; + gs_viewport_push(); gs_projection_push(); gs_matrix_push();