summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2013-09-17 18:47:45 +0200
committerMikael Magnusson <mikachu@gmail.com>2014-04-10 22:29:01 +0200
commita8a2375c449c18509c1c98c9fad972f3d9ec78fd (patch)
treefff737dc3026b67bfdf7e6a0efd01e1a014cfcc8
parent835ef3253f4999acb440b8b348542d0fce937897 (diff)
Don't segfault when there's no target in If
-rw-r--r--openbox/actions/if.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/openbox/actions/if.c b/openbox/actions/if.c
index a083d485..67d067e2 100644
--- a/openbox/actions/if.c
+++ b/openbox/actions/if.c
@@ -327,7 +327,10 @@ static gboolean run_func_if(ObActionsData *data, gpointer options)
}
/* If there's no client to query, then false. */
- is_true &= query_target != NULL;
+ if (!query_target) {
+ is_true = FALSE;
+ break;
+ }
if (q->shaded_on)
is_true &= query_target->shaded;