better check these too
This commit is contained in:
parent
008685a90e
commit
b66dde6e94
1 changed files with 3 additions and 3 deletions
|
@ -483,17 +483,17 @@ std::string FbWindow::textProperty(Atom property) const {
|
||||||
} else if (text_prop.encoding == m_utf8string && text_prop.format == 8) {
|
} else if (text_prop.encoding == m_utf8string && text_prop.format == 8) {
|
||||||
#ifdef X_HAVE_UTF8_STRING
|
#ifdef X_HAVE_UTF8_STRING
|
||||||
Xutf8TextPropertyToTextList(display(), &text_prop, &stringlist, &count);
|
Xutf8TextPropertyToTextList(display(), &text_prop, &stringlist, &count);
|
||||||
if (count == 0)
|
if (count == 0 || stringlist == 0)
|
||||||
return "";
|
return "";
|
||||||
#else
|
#else
|
||||||
if (XTextPropertyToStringList(&text_prop, &stringlist, &count) == 0 || count == 0)
|
if (XTextPropertyToStringList(&text_prop, &stringlist, &count) == 0 || count == 0 || stringlist == 0)
|
||||||
return "";
|
return "";
|
||||||
#endif
|
#endif
|
||||||
ret = stringlist[0];
|
ret = stringlist[0];
|
||||||
} else {
|
} else {
|
||||||
// still returns a "StringList" despite the different name
|
// still returns a "StringList" despite the different name
|
||||||
XmbTextPropertyToTextList(display(), &text_prop, &stringlist, &count);
|
XmbTextPropertyToTextList(display(), &text_prop, &stringlist, &count);
|
||||||
if (count == 0)
|
if (count == 0 || stringlist == 0)
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
ret = FbStringUtil::LocaleStrToFb(stringlist[0]);
|
ret = FbStringUtil::LocaleStrToFb(stringlist[0]);
|
||||||
|
|
Loading…
Reference in a new issue