libobs: Do not draw item texture if source size 0

master
jp9000 2018-06-01 02:31:36 -07:00
parent b3dfd7ef80
commit a1012c3f2c
1 changed files with 4 additions and 0 deletions

View File

@ -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);