winex11: Add check for XmbTextPropertyToTextList result.

This commit is contained in:
Vitaly Lipatov 2008-11-24 23:06:40 +03:00 committed by Alexandre Julliard
parent 9ef1f0fe2e
commit 934aa492b4
1 changed files with 3 additions and 2 deletions

View File

@ -1224,7 +1224,7 @@ HANDLE X11DRV_CLIPBOARD_ImportUTF8(Display *display, Window w, Atom prop)
*/
static HANDLE X11DRV_CLIPBOARD_ImportCompoundText(Display *display, Window w, Atom prop)
{
int i, j;
int i, j, ret;
char** srcstr;
int count, lcount;
int srclen, destlen;
@ -1239,9 +1239,10 @@ static HANDLE X11DRV_CLIPBOARD_ImportCompoundText(Display *display, Window w, At
txtprop.encoding = x11drv_atom(COMPOUND_TEXT);
txtprop.format = 8;
wine_tsx11_lock();
XmbTextPropertyToTextList(display, &txtprop, &srcstr, &count);
ret = XmbTextPropertyToTextList(display, &txtprop, &srcstr, &count);
wine_tsx11_unlock();
HeapFree(GetProcessHeap(), 0, txtprop.value);
if (ret != Success || !count) return 0;
TRACE("Importing %d line(s)\n", count);