vo_gpu: opengl: fix possible screenshot window crash

gl_read_fbo_contents can fail

Fixes #4905
This commit is contained in:
Niklas Haas 2017-09-22 14:19:11 +02:00
parent d325f30fb5
commit aabe12b0bc
1 changed files with 1 additions and 1 deletions

View File

@ -260,7 +260,7 @@ struct mp_image *ra_gl_ctx_screenshot(struct ra_swapchain *sw)
// OpenGL FB is also read in flipped order, so we need to flip when the
// rendering is *not* flipped, which in our case is whenever
// p->params.flipped is true. I hope that made sense
if (p->params.flipped)
if (screen && p->params.flipped)
mp_image_vflip(screen);
return screen;