--- src/FbTk/FbWindow.cc 2007-03-19 15:57:07.000000000 -0400 +++ ../src/src/FbTk/FbWindow.cc 2007-05-05 18:41:03.000000000 -0400 @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbWindow.cc 4664 2007-01-08 21:12:47Z markt $ +// $Id: FbWindow.cc 4876 2007-05-05 22:33:36Z markt $ #include "FbWindow.hh" #include "FbPixmap.hh" @@ -465,7 +465,7 @@ std::string FbWindow::textProperty(Atom property) const { XTextProperty text_prop; char ** stringlist = 0; - int count; + int count = 0; std::string ret; static Atom m_utf8string = XInternAtom(display(), "UTF8_STRING", False); @@ -483,16 +483,17 @@ } else if (text_prop.encoding == m_utf8string && text_prop.format == 8) { #ifdef X_HAVE_UTF8_STRING Xutf8TextPropertyToTextList(display(), &text_prop, &stringlist, &count); - if (count == 0) + if (count == 0 || stringlist == 0) return ""; #else - if (XTextPropertyToStringList(&text_prop, &stringlist, &count) == 0 || count == 0) + if (XTextPropertyToStringList(&text_prop, &stringlist, &count) == 0 || count == 0 || stringlist == 0) return ""; #endif ret = stringlist[0]; } else { // still returns a "StringList" despite the different name - if (XmbTextPropertyToTextList(display(), &text_prop, &stringlist, &count) == 0 || count == 0) + XmbTextPropertyToTextList(display(), &text_prop, &stringlist, &count); + if (count == 0 || stringlist == 0) return ""; ret = FbStringUtil::LocaleStrToFb(stringlist[0]);