summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/out/opengl/hwdec_rpi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/video/out/opengl/hwdec_rpi.c b/video/out/opengl/hwdec_rpi.c
index 0caa01874c..90a350eac1 100644
--- a/video/out/opengl/hwdec_rpi.c
+++ b/video/out/opengl/hwdec_rpi.c
@@ -136,7 +136,9 @@ static void update_overlay(struct gl_hwdec *hw, bool check_window_only)
int defs[4] = {0, 0, 0, 0};
int *z =
- gl->MPGetNativeDisplay ? gl->MPGetNativeDisplay("MPV_RPI_WINDOW") : defs;
+ gl->MPGetNativeDisplay ? gl->MPGetNativeDisplay("MPV_RPI_WINDOW") : NULL;
+ if (!z)
+ z = defs;
// As documented in the libmpv openglcb headers.
int display = z[0];