diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-10-17 19:55:00 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-10-17 19:55:00 +1000 |
commit | 17014c34e2f3568af06b4fc9323256d2b7aa8947 (patch) | |
tree | 7f10ebd976c5f1eff4d33bd7d1b5530490d54317 /sway/commands/title_format.c | |
parent | Merge pull request #2843 from c-edw/feature/2842_TruncateMessage (diff) | |
download | sway-17014c34e2f3568af06b4fc9323256d2b7aa8947.tar.gz sway-17014c34e2f3568af06b4fc9323256d2b7aa8947.tar.zst sway-17014c34e2f3568af06b4fc9323256d2b7aa8947.zip |
Fix crashes when running certain commands on an empty workspace
This fixes crashes when running the border, mark, unmark and
title_format commands on an empty workspace.
Diffstat (limited to 'sway/commands/title_format.c')
-rw-r--r-- | sway/commands/title_format.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/commands/title_format.c b/sway/commands/title_format.c index c9ffe8fa..ef1c8935 100644 --- a/sway/commands/title_format.c +++ b/sway/commands/title_format.c | |||
@@ -12,7 +12,7 @@ struct cmd_results *cmd_title_format(int argc, char **argv) { | |||
12 | return error; | 12 | return error; |
13 | } | 13 | } |
14 | struct sway_container *container = config->handler_context.container; | 14 | struct sway_container *container = config->handler_context.container; |
15 | if (!container->view) { | 15 | if (!container || !container->view) { |
16 | return cmd_results_new(CMD_INVALID, "title_format", | 16 | return cmd_results_new(CMD_INVALID, "title_format", |
17 | "Only views can have a title_format"); | 17 | "Only views can have a title_format"); |
18 | } | 18 | } |