From e36674c5b8389ff93537fdc9ad32d23bd7add61d Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 4 Aug 2012 15:19:11 +0200 Subject: [PATCH] Fix a crash when the current output cannot be determined (Thanks Tucos) This is only a cosmetical change though, the fix for the root cause can be found in the commits following this one. --- src/commands.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/commands.c b/src/commands.c index abde85d8..66270f75 100644 --- a/src/commands.c +++ b/src/commands.c @@ -1001,9 +1001,14 @@ void cmd_move_workspace_to_output(I3_CMD, char *name) { TAILQ_FOREACH(current, &owindows, owindows) { Output *current_output = get_output_containing(current->con->rect.x, current->con->rect.y); + if (!current_output) { + ELOG("Cannot get current output. This is a bug in i3.\n"); + ysuccess(false); + return; + } Output *output = get_output_from_string(current_output, name); if (!output) { - LOG("No such output\n"); + ELOG("Could not get output from string \"%s\"\n", name); ysuccess(false); return; } -- 2.39.5