mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
Prevent missing direction arguments to segfault labwc
Reported-by: @Flrian
This commit is contained in:
parent
0a7e380c14
commit
986ab70780
2 changed files with 20 additions and 2 deletions
12
src/action.c
12
src/action.c
|
|
@ -174,10 +174,18 @@ actions_run(struct view *activator, struct server *server,
|
|||
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 = desktop_cycle_view(server,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue