diff options
author | Colin Harrison <colin.harrison-at-virgin.net> | 2007-05-09 16:55:27 +0100 |
---|---|---|
committer | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2007-05-09 16:55:27 +0100 |
commit | 86c4941727f7c673ae6bb88c67443fa25935c7f5 (patch) | |
tree | 5c54903201f031901e394c45299ba4b0b05180fd | |
parent | be44018a3c6172caf3e91c36ea321420d104e79f (diff) |
fix an occasional crash in GetWindowName() (bug: 9798)
-rw-r--r-- | hw/xwin/winmultiwindowwm.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c index 1918e54d1..5401ecdee 100644 --- a/hw/xwin/winmultiwindowwm.c +++ b/hw/xwin/winmultiwindowwm.c @@ -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); |