Protect "move position mouse" against a NULL access.
This could happen if two outputs are set up to have a gap in between them and the mouse cursor being in said gap when the command is triggered.
This commit is contained in:
parent
fbbe9cf2e8
commit
8801de2399
|
@ -440,6 +440,10 @@ void floating_move_to_pointer(Con *con) {
|
|||
}
|
||||
|
||||
Output *output = get_output_containing(reply->root_x, reply->root_y);
|
||||
if (output == NULL) {
|
||||
ELOG("The pointer is not on any output, cannot move the container here.");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Determine where to put the window. */
|
||||
int32_t x = reply->root_x - con->rect.width / 2;
|
||||
|
|
Loading…
Reference in New Issue