Handle config-related allocation failures

This commit is contained in:
Drew DeVault 2016-12-15 17:52:53 -05:00
parent 248df18c24
commit d75a747a3d
3 changed files with 134 additions and 58 deletions

View file

@ -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;
}