mirror of
https://github.com/swaywm/sway.git
synced 2026-05-05 06:46:49 -04:00
Extra NULL checks
This commit is contained in:
parent
913dd235ee
commit
1d115ddca9
1 changed files with 5 additions and 3 deletions
|
|
@ -51,9 +51,11 @@ 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 (!strcmp("lockscreen", surface->namespace))
|
||||
wlr_log(L_DEBUG, "Lockscreen found!");
|
||||
return true;
|
||||
if (surface != NULL && surface->namespace != NULL) {
|
||||
if (!strcmp("lockscreen", surface->namespace))
|
||||
wlr_log(L_DEBUG, "Lockscreen found!");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue