diff options
-rw-r--r-- | src/FbTk/FbWindow.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/FbTk/FbWindow.cc b/src/FbTk/FbWindow.cc index 1dba746..450ca32 100644 --- a/src/FbTk/FbWindow.cc +++ b/src/FbTk/FbWindow.cc | |||
@@ -483,17 +483,17 @@ std::string FbWindow::textProperty(Atom property) const { | |||
483 | } else if (text_prop.encoding == m_utf8string && text_prop.format == 8) { | 483 | } else if (text_prop.encoding == m_utf8string && text_prop.format == 8) { |
484 | #ifdef X_HAVE_UTF8_STRING | 484 | #ifdef X_HAVE_UTF8_STRING |
485 | Xutf8TextPropertyToTextList(display(), &text_prop, &stringlist, &count); | 485 | Xutf8TextPropertyToTextList(display(), &text_prop, &stringlist, &count); |
486 | if (count == 0) | 486 | if (count == 0 || stringlist == 0) |
487 | return ""; | 487 | return ""; |
488 | #else | 488 | #else |
489 | if (XTextPropertyToStringList(&text_prop, &stringlist, &count) == 0 || count == 0) | 489 | if (XTextPropertyToStringList(&text_prop, &stringlist, &count) == 0 || count == 0 || stringlist == 0) |
490 | return ""; | 490 | return ""; |
491 | #endif | 491 | #endif |
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 | XmbTextPropertyToTextList(display(), &text_prop, &stringlist, &count); | 495 | XmbTextPropertyToTextList(display(), &text_prop, &stringlist, &count); |
496 | if (count == 0) | 496 | if (count == 0 || stringlist == 0) |
497 | return ""; | 497 | return ""; |
498 | 498 | ||
499 | ret = FbStringUtil::LocaleStrToFb(stringlist[0]); | 499 | ret = FbStringUtil::LocaleStrToFb(stringlist[0]); |