diff options
Diffstat (limited to 'src/FbTk')
-rw-r--r-- | src/FbTk/FbWindow.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/FbTk/FbWindow.cc b/src/FbTk/FbWindow.cc index 926abfd..1dba746 100644 --- a/src/FbTk/FbWindow.cc +++ b/src/FbTk/FbWindow.cc | |||
@@ -465,7 +465,7 @@ void FbWindow::reparent(const FbWindow &parent, int x, int y, bool continuing) { | |||
465 | std::string FbWindow::textProperty(Atom property) const { | 465 | std::string FbWindow::textProperty(Atom property) const { |
466 | XTextProperty text_prop; | 466 | XTextProperty text_prop; |
467 | char ** stringlist = 0; | 467 | char ** stringlist = 0; |
468 | int count; | 468 | int count = 0; |
469 | std::string ret; | 469 | std::string ret; |
470 | 470 | ||
471 | static Atom m_utf8string = XInternAtom(display(), "UTF8_STRING", False); | 471 | static Atom m_utf8string = XInternAtom(display(), "UTF8_STRING", False); |
@@ -492,7 +492,8 @@ std::string FbWindow::textProperty(Atom property) const { | |||
492 | ret = stringlist[0]; | 492 | ret = stringlist[0]; |
493 | } else { | 493 | } else { |
494 | // still returns a "StringList" despite the different name | 494 | // still returns a "StringList" despite the different name |
495 | if (XmbTextPropertyToTextList(display(), &text_prop, &stringlist, &count) == 0 || count == 0) | 495 | XmbTextPropertyToTextList(display(), &text_prop, &stringlist, &count); |
496 | if (count == 0) | ||
496 | return ""; | 497 | return ""; |
497 | 498 | ||
498 | ret = FbStringUtil::LocaleStrToFb(stringlist[0]); | 499 | ret = FbStringUtil::LocaleStrToFb(stringlist[0]); |