bar/wayland: fail when we can't find the specified monitor

This commit is contained in:
Daniel Eklöf 2019-09-22 11:59:48 +02:00
parent 5d6df44a79
commit 18e9d67d77
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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");