From: Ingo Bürk Date: Thu, 14 May 2015 17:07:56 +0000 (-0400) Subject: Protect "move position mouse" against a NULL access. X-Git-Tag: 4.11~107^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8801de2399e0c28f3c9acbc717d79fa374f1979f;p=i3%2Fi3 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. --- diff --git a/src/floating.c b/src/floating.c index d44334fe..a2843535 100644 --- a/src/floating.c +++ b/src/floating.c @@ -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;