mirror of
https://codeberg.org/dwl/dwl.git
synced 2026-09-19 22:02:50 +00:00
don't crash when clicking an empty area
If l is not initialized, accessing
l->layer_surface->current.keyboard_interactive causes a segmentation
fault. This was hard to see because c above was never initialized but
never caused a crash, and dwl also didn't crash building with ASan.
Also initialize c to be safe.
Fixes 4c54bd8.
Fixes https://codeberg.org/dwl/dwl/issues/1225.
This commit is contained in:
@@ -643,8 +643,8 @@ buttonpress(struct wl_listener *listener, void *data)
|
||||
struct wlr_pointer_button_event *event = data;
|
||||
struct wlr_keyboard *keyboard;
|
||||
uint32_t mods;
|
||||
Client *c;
|
||||
LayerSurface *l;
|
||||
Client *c = NULL;
|
||||
LayerSurface *l = NULL;
|
||||
const Button *b;
|
||||
|
||||
wlr_idle_notifier_v1_notify_activity(idle_notifier, seat);
|
||||
|
||||
Reference in New Issue
Block a user