From 18e9d67d778361ae50449374fed6789c0c02439d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 22 Sep 2019 11:59:48 +0200 Subject: [PATCH] bar/wayland: fail when we can't find the specified monitor --- bar/wayland.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bar/wayland.c b/bar/wayland.c index a5be23e..23edb81 100644 --- a/bar/wayland.c +++ b/bar/wayland.c @@ -595,6 +595,12 @@ setup(struct bar *_bar) backend->monitor = mon; } + if (backend->monitor == NULL) { + LOG_ERR("failed to find the specified monitor: %s", + bar->monitor != NULL ? bar->monitor : "default"); + return false; + } + backend->surface = wl_compositor_create_surface(backend->compositor); if (backend->surface == NULL) { LOG_ERR("failed to create panel surface");