Check if xfreerdp window != NULL

When xfreerdp aborts a connection it may be before xfc->window was allocated.
Don't access it in that case.
This commit is contained in:
Armin Novak 2018-02-13 13:38:02 +01:00
parent c44605299f
commit 7274ffe6a8
1 changed files with 1 additions and 1 deletions

View File

@ -1310,7 +1310,7 @@ static void xf_post_disconnect(freerdp* instance)
xfc->xfDisp = NULL;
}
if (xfc->drawable == xfc->window->handle)
if ((xfc->window != NULL) && (xfc->drawable == xfc->window->handle))
xfc->drawable = NULL;
else
xf_DestroyDummyWindow(xfc, xfc->drawable);