winemac: Add proper locking in macdrv_surface_set_region().

This commit is contained in:
Ken Thomases 2013-03-28 23:33:56 -05:00 committed by Alexandre Julliard
parent 83e233c97d
commit 7ab76484c4

View File

@ -124,6 +124,8 @@ static void macdrv_surface_set_region(struct window_surface *window_surface, HRG
TRACE("updating surface %p with %p\n", surface, region);
window_surface->funcs->lock(window_surface);
HeapFree(GetProcessHeap(), 0, surface->region_data);
surface->region_data = NULL;
@ -133,6 +135,8 @@ static void macdrv_surface_set_region(struct window_surface *window_surface, HRG
if (rc != ERROR)
surface->region_data = get_region_data(region, 0);
}
window_surface->funcs->unlock(window_surface);
}
/***********************************************************************