mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2024-12-12 03:06:34 +08:00
xfreerdp: fix segfault when closing.
This commit is contained in:
parent
c08fef7d33
commit
0c60fafebd
@ -357,9 +357,14 @@ void xf_SetWindowIcon(xfInfo* xfi, xfWindow* window, rdpIcon* icon)
|
||||
|
||||
void xf_DestroyWindow(xfInfo* xfi, xfWindow* window)
|
||||
{
|
||||
XFreeGC(xfi->display, window->gc);
|
||||
XFreePixmap(xfi->display, window->surface);
|
||||
XUnmapWindow(xfi->display, window->handle);
|
||||
XDestroyWindow(xfi->display, window->handle);
|
||||
if (window->gc)
|
||||
XFreeGC(xfi->display, window->gc);
|
||||
if (window->surface)
|
||||
XFreePixmap(xfi->display, window->surface);
|
||||
if (window->handle)
|
||||
{
|
||||
XUnmapWindow(xfi->display, window->handle);
|
||||
XDestroyWindow(xfi->display, window->handle);
|
||||
}
|
||||
xfree(window);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user