mirror of
https://github.com/labwc/labwc.git
synced 2026-04-10 08:21:07 -04:00
Prevent missing direction arguments to segfault labwc
Reported-by: @Flrian
Backport of 986ab70780
This commit is contained in:
parent
e5a511668e
commit
6f13ae2449
2 changed files with 20 additions and 2 deletions
12
src/action.c
12
src/action.c
|
|
@ -178,10 +178,18 @@ action(struct view *activator, struct server *server, struct wl_list *actions, u
|
|||
wl_display_terminate(server->wl_display);
|
||||
break;
|
||||
case ACTION_TYPE_MOVE_TO_EDGE:
|
||||
view_move_to_edge(view, action->arg);
|
||||
if (action->arg) {
|
||||
view_move_to_edge(view, action->arg);
|
||||
} else {
|
||||
wlr_log(WLR_ERROR, "Missing argument for MoveToEdge");
|
||||
}
|
||||
break;
|
||||
case ACTION_TYPE_SNAP_TO_EDGE:
|
||||
view_snap_to_edge(view, action->arg);
|
||||
if (action->arg) {
|
||||
view_snap_to_edge(view, action->arg);
|
||||
} else {
|
||||
wlr_log(WLR_ERROR, "Missing argument for SnapToEdge");
|
||||
}
|
||||
break;
|
||||
case ACTION_TYPE_NEXT_WINDOW:
|
||||
server->cycle_view =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue