mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-14 00:14:11 +09:00
[client,x11] fix xf_DeleteSurface error branch
This commit is contained in:
@@ -424,19 +424,20 @@ static UINT xf_DeleteSurface(RdpgfxClientContext* context,
|
||||
const RDPGFX_DELETE_SURFACE_PDU* deleteSurface)
|
||||
{
|
||||
rdpCodecs* codecs = NULL;
|
||||
xfGfxSurface* surface = NULL;
|
||||
|
||||
UINT status = 0;
|
||||
EnterCriticalSection(&context->mux);
|
||||
surface = (xfGfxSurface*)context->GetSurfaceData(context, deleteSurface->surfaceId);
|
||||
xfGfxSurface* surface =
|
||||
(xfGfxSurface*)context->GetSurfaceData(context, deleteSurface->surfaceId);
|
||||
|
||||
if (surface)
|
||||
{
|
||||
if (surface->gdi.windowMapped)
|
||||
{
|
||||
const UINT rc = IFCALLRESULT(CHANNEL_RC_OK, context->UnmapWindowForSurface, context,
|
||||
surface->gdi.windowId);
|
||||
if (rc != CHANNEL_RC_OK)
|
||||
return rc;
|
||||
status = IFCALLRESULT(CHANNEL_RC_OK, context->UnmapWindowForSurface, context,
|
||||
surface->gdi.windowId);
|
||||
if (status != CHANNEL_RC_OK)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
#ifdef WITH_GFX_H264
|
||||
@@ -456,6 +457,7 @@ static UINT xf_DeleteSurface(RdpgfxClientContext* context,
|
||||
if (codecs && codecs->progressive)
|
||||
progressive_delete_surface_context(codecs->progressive, deleteSurface->surfaceId);
|
||||
|
||||
fail:
|
||||
LeaveCriticalSection(&context->mux);
|
||||
return status;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user