]> Dogcows Code - chaz/openbox/commitdiff
dont set ret unless you will be returning TRUE
authorDana Jansens <danakj@orodu.net>
Fri, 10 Oct 2003 04:33:12 +0000 (04:33 +0000)
committerDana Jansens <danakj@orodu.net>
Fri, 10 Oct 2003 04:33:12 +0000 (04:33 +0000)
openbox/prop.c

index 16ab60cbed7dbb5b8faf599e69231f460e2340c2..98bbbd995536f2b9f5b37ca800776be7a929ea1f 100644 (file)
@@ -289,12 +289,16 @@ gboolean prop_get_string_locale(Window win, Atom prop, char **ret)
 {
     char **list;
     int nstr;
+    char *s;
 
     if (get_stringlist(win, prop, &list, &nstr) && nstr) {
-        *ret = g_convert(list[0], strlen(list[0]), "UTF-8", "ISO-8859-1",
+        s = g_convert(list[0], strlen(list[0]), "UTF-8", "ISO-8859-1",
                          NULL, NULL, NULL);
         XFreeStringList(list);
-        if (*ret) return TRUE;
+        if (s) {
+            *ret = s;
+            return TRUE;
+        }
     }
     return FALSE;
 }
This page took 0.025431 seconds and 4 git commands to generate.