Skip to content

Commit

Permalink
MoveToScreen: fix NULL-dereference
Browse files Browse the repository at this point in the history
Retain the old behaviour of 'MoveToScreen' without any argument imply
the current screen.
  • Loading branch information
ThomasAdam committed Aug 30, 2021
1 parent 4290959 commit b2bf207
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions fvwm/move_resize.c
Original file line number Diff line number Diff line change
Expand Up @@ -2126,15 +2126,11 @@ static void __move_window(F_CMD_ARGS, Bool do_animate, int mode)
rectangle r;
rectangle s;
rectangle p;
struct monitor *m;
struct monitor *m = monitor_get_current();
char *token;

if (action == NULL)
m = monitor_get_current();
else {
token = PeekToken(action, &action);
if (action != NULL && (token = PeekToken(action, &action)) != NULL)
m = monitor_resolve_name(token);
}

s.x = m->si->x;
s.y = m->si->y;
Expand Down

0 comments on commit b2bf207

Please sign in to comment.