From f767ac30b3425689e3196930bd51d7e6f5f55d50 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Fri, 25 Jan 2013 14:53:15 +0100 Subject: [PATCH] fix two more crashes when disabling an empty output --- src/output.c | 5 ++--- src/render.c | 5 ++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/output.c b/src/output.c index fe8d4983..1a1a5c46 100644 --- a/src/output.c +++ b/src/output.c @@ -4,7 +4,7 @@ * vim:ts=4:sw=4:expandtab * * i3 - an improved dynamic tiling window manager - * © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE) + * © 2009-2013 Michael Stapelberg and contributors (see also: LICENSE) * * output.c: Output (monitor) related functions. * @@ -22,6 +22,5 @@ Con *output_get_content(Con *output) { if (child->type == CT_CON) return child; - ELOG("output_get_content() called on non-output %p\n", output); - assert(false); + return NULL; } diff --git a/src/render.c b/src/render.c index a0d66d82..85347c4c 100644 --- a/src/render.c +++ b/src/render.c @@ -44,7 +44,10 @@ static void render_l_output(Con *con) { } } - assert(content != NULL); + if (content == NULL) { + DLOG("Skipping this output because it is currently being destroyed.\n"); + return; + } /* We need to find out if there is a fullscreen con on the current workspace * and take the short-cut to render it directly (the user does not want to -- 2.39.5