From: Mikael Magnusson Date: Tue, 17 Sep 2013 16:47:45 +0000 (+0200) Subject: Don't segfault when there's no target in If X-Git-Tag: release-3.6.0~52 X-Git-Url: http://git.openbox.org/?p=dana%2Fopenbox.git;a=commitdiff_plain;h=a8a2375c449c18509c1c98c9fad972f3d9ec78fd Don't segfault when there's no target in If --- diff --git a/openbox/actions/if.c b/openbox/actions/if.c index a083d48..67d067e 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;