mirror of https://github.com/mpv-player/mpv
vo_gpu: fix segfault when OSD tex creation fails
If !osd->texture, then mpgl_osd_draw_prepare fails.
This commit is contained in:
parent
f0b6860d62
commit
a3c808c6c8
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue