Skip to content
Snippets Groups Projects
Commit 9a63a25b authored by Alexandre Julliard's avatar Alexandre Julliard
Browse files

gdi32: Don't free a driver when it's popped from the stack.

parent f4e9bdb9
No related branches found
No related tags found
No related merge requests found
......@@ -181,7 +181,12 @@ void free_dc_ptr( DC *dc )
{
assert( dc->refcount == 1 );
while (dc->physDev != &dc->nulldrv) pop_dc_driver( dc, dc->physDev );
while (dc->physDev != &dc->nulldrv)
{
PHYSDEV physdev = dc->physDev;
pop_dc_driver( dc, physdev );
physdev->funcs->pDeleteDC( physdev );
}
free_gdi_handle( dc->hSelf );
free_dc_state( dc );
}
......@@ -266,7 +271,6 @@ void pop_dc_driver( DC * dc, PHYSDEV physdev )
assert( physdev == dc->physDev );
assert( physdev != &dc->nulldrv );
dc->physDev = physdev->next;
physdev->funcs->pDeleteDC( physdev );
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment