Extra NULL checks

This commit is contained in:
Mattias Eriksson 2018-04-25 21:25:29 +02:00
parent 913dd235ee
commit 1d115ddca9

View file

@ -51,11 +51,13 @@ bool have_lock() {
struct sway_layer_surface *sway_layer;
wl_list_for_each_reverse(sway_layer, layers, link) {
struct wlr_layer_surface *surface = sway_layer->layer_surface;
if (surface != NULL && surface->namespace != NULL) {
if (!strcmp("lockscreen", surface->namespace))
wlr_log(L_DEBUG, "Lockscreen found!");
return true;
}
}
}
wlr_log(L_DEBUG, "No lock");
return false;