diff options
-rw-r--r-- | video/out/wayland_common.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index 6b6b3dc9b1..cc214a6e8d 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -2425,6 +2425,9 @@ bool vo_wayland_init(struct vo *vo) vo->wl = talloc_zero(NULL, struct vo_wayland_state); struct vo_wayland_state *wl = vo->wl; + if (!getenv("WAYLAND_DISPLAY")) + goto err; + *wl = (struct vo_wayland_state) { .display = wl_display_connect(NULL), .vo = vo, |