dont set ret unless you will be returning TRUE
This commit is contained in:
parent
6dddd86975
commit
364bb1550a
1 changed files with 6 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue