Browse Source

libobs: Do not draw item texture if source size 0

jp9000 7 years ago
parent
commit
a1012c3f2c
1 changed files with 4 additions and 0 deletions
  1. 4 0
      libobs/obs-scene.c

+ 4 - 0
libobs/obs-scene.c

@@ -464,6 +464,10 @@ static inline void render_item(struct obs_scene_item *item)
 	if (item->item_render) {
 		uint32_t width  = obs_source_get_width(item->source);
 		uint32_t height = obs_source_get_height(item->source);
+
+		if (!width || !height)
+			return;
+
 		uint32_t cx = calc_cx(item, width);
 		uint32_t cy = calc_cy(item, height);