vo_gpu: fix segfault when OSD tex creation fails

If !osd->texture, then mpgl_osd_draw_prepare fails.
This commit is contained in:
Niklas Haas 2018-11-17 17:12:42 +01:00 committed by Jan Ekström
parent f0b6860d62
commit a3c808c6c8
1 changed files with 1 additions and 1 deletions

View File

@ -212,7 +212,7 @@ bool mpgl_osd_draw_prepare(struct mpgl_osd *ctx, int index,
struct mpgl_osd_part *part = ctx->parts[index];
enum sub_bitmap_format fmt = part->format;
if (!fmt || !part->num_subparts)
if (!fmt || !part->num_subparts || !part->texture)
return false;
gl_sc_uniform_texture(sc, "osdtex", part->texture);