wined3d: Ensure that wined3d_cs_st_require_space allocates the required space.

This commit is contained in:
Sebastian Lackner 2013-10-01 19:58:54 +02:00 committed by Alexandre Julliard
parent fabffe2b94
commit af759e30c9

View File

@ -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;
}