aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/unmark.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-10-17 16:13:05 +0200
committerGitHub <noreply@github.com>2018-10-17 16:13:05 +0200
commite46c3ffbc9f3cf51f08b3b9a0ae1c62e7ddd0a9a (patch)
treee5d745938b5ad46e049d3c04886ef3311dcb5f23 /sway/commands/unmark.c
parent765c80e5f7c36df77e9475a662648a0d87b93606 (diff)
parent17014c34e2f3568af06b4fc9323256d2b7aa8947 (diff)
Merge pull request #2861 from RyanDwyer/fix-empty-workspace-crashes
Fix crashes when running certain commands on an empty workspace
Diffstat (limited to 'sway/commands/unmark.c')
-rw-r--r--sway/commands/unmark.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/commands/unmark.c b/sway/commands/unmark.c
index c6251dc8..c671ed4e 100644
--- a/sway/commands/unmark.c
+++ b/sway/commands/unmark.c
@@ -25,7 +25,7 @@ struct cmd_results *cmd_unmark(int argc, char **argv) {
struct sway_view *view = NULL;
if (config->handler_context.using_criteria) {
struct sway_container *container = config->handler_context.container;
- if (!container->view) {
+ if (!container || !container->view) {
return cmd_results_new(CMD_INVALID, "unmark",
"Only views can have marks");
}