X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Factions%2Fif.c;h=0e055a98f0099ea95828388f100febbf17525a37;hb=d082572b17443b1e8a72d8b893d720e99aaf3dfe;hp=28010d388b43b0479417bdb1c2d188528a03de29;hpb=46ca54fd81096b466e51eace79d0761b2c4923f7;p=chaz%2Fopenbox diff --git a/openbox/actions/if.c b/openbox/actions/if.c index 28010d38..0e055a98 100644 --- a/openbox/actions/if.c +++ b/openbox/actions/if.c @@ -98,13 +98,16 @@ static gpointer setup_func(xmlNodePtr node) o->decor_on = TRUE; } if ((n = obt_xml_find_node(node, "desktop"))) { - gchar *s = obt_xml_node_string(n); - if (!g_ascii_strcasecmp(s, "current")) - o->desktop_current = TRUE; - if (!g_ascii_strcasecmp(s, "other")) - o->desktop_other = TRUE; - else - o->desktop_number = atoi(s); + gchar *s; + if ((s = obt_xml_node_string(n))) { + if (!g_ascii_strcasecmp(s, "current")) + o->desktop_current = TRUE; + if (!g_ascii_strcasecmp(s, "other")) + o->desktop_other = TRUE; + else + o->desktop_number = atoi(s); + g_free(s); + } } if ((n = obt_xml_find_node(node, "omnipresent"))) { if (obt_xml_node_bool(n))