summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2017-09-22 14:19:11 +0200
committerNiklas Haas <git@haasn.xyz>2017-09-22 14:20:22 +0200
commitaabe12b0bc4cdf13c494dc8f725174e3a1c07786 (patch)
tree9f579f13e968d77c55dd577d2284edd0927ec81e /video
parentd325f30fb591c560744410edb55cd378f2b7b429 (diff)
downloadmpv-aabe12b0bc4cdf13c494dc8f725174e3a1c07786.tar.bz2
mpv-aabe12b0bc4cdf13c494dc8f725174e3a1c07786.tar.xz
vo_gpu: opengl: fix possible screenshot window crash
gl_read_fbo_contents can fail Fixes #4905
Diffstat (limited to 'video')
-rw-r--r--video/out/opengl/context.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/opengl/context.c b/video/out/opengl/context.c
index 6c8821f6c7..85be3a0ace 100644
--- a/video/out/opengl/context.c
+++ b/video/out/opengl/context.c
@@ -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;