fix an occasional crash in GetWindowName() (bug: 9798)
This commit is contained in:
parent
be44018a3c
commit
86c4941727
|
@ -445,10 +445,7 @@ GetWindowName (Display *pDisplay, Window iWin, char **ppName)
|
|||
}
|
||||
else
|
||||
{
|
||||
XmbTextPropertyToTextList (pDisplay, &xtpName, &ppList, &nNum);
|
||||
|
||||
/* */
|
||||
if (nNum && ppList && *ppList)
|
||||
if (XmbTextPropertyToTextList (pDisplay, &xtpName, &ppList, &nNum) >= Success && nNum > 0 && *ppList)
|
||||
{
|
||||
*ppName = strdup (*ppList);
|
||||
XFreeStringList (ppList);
|
||||
|
|
Loading…
Reference in New Issue
Block a user