diff options
author | markt <markt> | 2007-05-05 22:33:36 (GMT) |
---|---|---|
committer | markt <markt> | 2007-05-05 22:33:36 (GMT) |
commit | b66dde6e943ec3919a6f4e74cd73397238ccd21a (patch) | |
tree | e66e74f2e66dcb36800b508ce00ae4b0aaef1daa | |
parent | 008685a90ee1d32b422f7d39011de8a6282d41e5 (diff) | |
download | fluxbox_paul-b66dde6e943ec3919a6f4e74cd73397238ccd21a.zip fluxbox_paul-b66dde6e943ec3919a6f4e74cd73397238ccd21a.tar.bz2 |
better check these too
-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]); |