Check if there is a current container before setting it's opacity

master
John Axel Eriksson 6 years ago
parent 6cb0e58c6d
commit 08139daaa4
No known key found for this signature in database
GPG Key ID: 04ED6F42C62F42E9

@ -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)) {

Loading…
Cancel
Save