From 86c4941727f7c673ae6bb88c67443fa25935c7f5 Mon Sep 17 00:00:00 2001 From: Colin Harrison Date: Wed, 9 May 2007 16:55:27 +0100 Subject: [PATCH] fix an occasional crash in GetWindowName() (bug: 9798) --- hw/xwin/winmultiwindowwm.c | 5 +---- 1 file changed, 1 insertion(+), 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);