Commit 3fb8a426 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

user32: Free the correct dce (Coverity).

parent f1b4c331
...@@ -314,9 +314,11 @@ static struct dce *get_window_dce( HWND hwnd ) ...@@ -314,9 +314,11 @@ static struct dce *get_window_dce( HWND hwnd )
if (dce_to_free) if (dce_to_free)
{ {
SetDCHook( dce->hdc, NULL, 0 ); SetDCHook( dce_to_free->hdc, NULL, 0 );
DeleteDC( dce->hdc ); DeleteDC( dce_to_free->hdc );
HeapFree( GetProcessHeap(), 0, dce ); HeapFree( GetProcessHeap(), 0, dce_to_free );
if (dce_to_free == dce)
dce = NULL;
} }
} }
return dce; return dce;
......
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