fix two more crashes when disabling an empty output

This commit is contained in:
Michael Stapelberg 2013-01-25 14:53:15 +01:00
parent e0cfe1f8c0
commit f767ac30b3
2 changed files with 6 additions and 4 deletions

View File

@ -4,7 +4,7 @@
* vim:ts=4:sw=4:expandtab * vim:ts=4:sw=4:expandtab
* *
* i3 - an improved dynamic tiling window manager * 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. * output.c: Output (monitor) related functions.
* *
@ -22,6 +22,5 @@ Con *output_get_content(Con *output) {
if (child->type == CT_CON) if (child->type == CT_CON)
return child; return child;
ELOG("output_get_content() called on non-output %p\n", output); return NULL;
assert(false);
} }

View File

@ -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 /* 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 * and take the short-cut to render it directly (the user does not want to