fix an occasional crash in GetWindowName() (bug: 9798)

This commit is contained in:
Colin Harrison 2007-05-09 16:55:27 +01:00 committed by Alan Hourihane
parent be44018a3c
commit 86c4941727

View File

@ -445,10 +445,7 @@ GetWindowName (Display *pDisplay, Window iWin, char **ppName)
} }
else else
{ {
XmbTextPropertyToTextList (pDisplay, &xtpName, &ppList, &nNum); if (XmbTextPropertyToTextList (pDisplay, &xtpName, &ppList, &nNum) >= Success && nNum > 0 && *ppList)
/* */
if (nNum && ppList && *ppList)
{ {
*ppName = strdup (*ppList); *ppName = strdup (*ppList);
XFreeStringList (ppList); XFreeStringList (ppList);