summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--openbox/prop.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/openbox/prop.c b/openbox/prop.c
index 16ab60cb..98bbbd99 100644
--- a/openbox/prop.c
+++ b/openbox/prop.c
@@ -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;
}