Commit 934aa492 authored by Vitaly Lipatov's avatar Vitaly Lipatov Committed by Alexandre Julliard

winex11: Add check for XmbTextPropertyToTextList result.

parent 9ef1f0fe
...@@ -1224,7 +1224,7 @@ HANDLE X11DRV_CLIPBOARD_ImportUTF8(Display *display, Window w, Atom prop) ...@@ -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) static HANDLE X11DRV_CLIPBOARD_ImportCompoundText(Display *display, Window w, Atom prop)
{ {
int i, j; int i, j, ret;
char** srcstr; char** srcstr;
int count, lcount; int count, lcount;
int srclen, destlen; int srclen, destlen;
...@@ -1239,9 +1239,10 @@ static HANDLE X11DRV_CLIPBOARD_ImportCompoundText(Display *display, Window w, At ...@@ -1239,9 +1239,10 @@ static HANDLE X11DRV_CLIPBOARD_ImportCompoundText(Display *display, Window w, At
txtprop.encoding = x11drv_atom(COMPOUND_TEXT); txtprop.encoding = x11drv_atom(COMPOUND_TEXT);
txtprop.format = 8; txtprop.format = 8;
wine_tsx11_lock(); wine_tsx11_lock();
XmbTextPropertyToTextList(display, &txtprop, &srcstr, &count); ret = XmbTextPropertyToTextList(display, &txtprop, &srcstr, &count);
wine_tsx11_unlock(); wine_tsx11_unlock();
HeapFree(GetProcessHeap(), 0, txtprop.value); HeapFree(GetProcessHeap(), 0, txtprop.value);
if (ret != Success || !count) return 0;
TRACE("Importing %d line(s)\n", count); TRACE("Importing %d line(s)\n", count);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment