Don't segfault when there's no target in If

This commit is contained in:
Mikael Magnusson 2013-09-17 18:47:45 +02:00
parent 835ef3253f
commit a8a2375c44

View file

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