mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 14:10:32 +00:00
wined3d: Ensure that wined3d_cs_st_require_space allocates the required space.
This commit is contained in:
parent
fabffe2b94
commit
af759e30c9
@ -374,10 +374,11 @@ static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
|
||||
{
|
||||
void *new_data;
|
||||
|
||||
if (!(new_data = HeapReAlloc(GetProcessHeap(), 0, cs->data, cs->data_size * 2)))
|
||||
size = max( size, cs->data_size * 2 );
|
||||
if (!(new_data = HeapReAlloc(GetProcessHeap(), 0, cs->data, size)))
|
||||
return NULL;
|
||||
|
||||
cs->data_size *= 2;
|
||||
cs->data_size = size;
|
||||
cs->data = new_data;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user