summaryrefslogtreecommitdiff
path: root/sway/handlers.c
diff options
context:
space:
mode:
authorDrew DeVault <[email protected]>2016-12-15 17:52:53 -0500
committerDrew DeVault <[email protected]>2016-12-15 19:01:41 -0500
commitd75a747a3ddc99f258025a923de1cf4821bf3115 (patch)
tree5fba9582e3d8d71f7d41f420e249d78bc5b4bee8 /sway/handlers.c
parent248df18c24d2a849de984b477ca3913ce7c72441 (diff)
Handle config-related allocation failures
Diffstat (limited to 'sway/handlers.c')
-rw-r--r--sway/handlers.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index 86a976d8..23a994b4 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -571,6 +571,10 @@ static void handle_binding_command(struct sway_binding *binding) {
// binding since it will be gone after the reload has completed.
if (strcasecmp(binding->command, "reload") == 0) {
binding_copy = sway_binding_dup(binding);
+ if (!binding_copy) {
+ sway_log(L_ERROR, "Unable to duplicate binding during reload");
+ return;
+ }
reload = true;
}