summaryrefslogtreecommitdiff
path: root/sway/commands/opacity.c
diff options
context:
space:
mode:
authorBrian Ashworth <[email protected]>2018-10-08 15:18:49 -0400
committerGitHub <[email protected]>2018-10-08 15:18:49 -0400
commit3f328b62768d7801f0544b31ab8f9dde3014fd1d (patch)
tree3572a9e1bff58710c22638d85ce1206af3999d94 /sway/commands/opacity.c
parentd21d2c8665f8fdaad719bb81cc636052f7c1d1a1 (diff)
parenta03955f9368cfa1c190e4194eed8437dce22eb77 (diff)
Merge branch 'master' into popup-during-fullscreen
Diffstat (limited to 'sway/commands/opacity.c')
-rw-r--r--sway/commands/opacity.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/commands/opacity.c b/sway/commands/opacity.c
index 9cdaad7f..4e4fc994 100644
--- a/sway/commands/opacity.c
+++ b/sway/commands/opacity.c
@@ -21,6 +21,10 @@ struct cmd_results *cmd_opacity(int argc, char **argv) {
struct sway_container *con = config->handler_context.container;
+ if (con == NULL) {
+ return cmd_results_new(CMD_FAILURE, "opacity", "No current container");
+ }
+
float opacity = 0.0f;
if (!parse_opacity(argv[0], &opacity)) {