mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 05:15:41 +00:00
[WINESYNC] d3dx9: Avoid double freeing samplers.
Signed-off-by: Paul Gofman <gofmanp@gmail.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id 6aced396bad8bea61733fda24f0cecabaec5041e by Paul Gofman <gofmanp@gmail.com>
This commit is contained in:
parent
abc5817112
commit
53b44b7c4d
2 changed files with 5 additions and 6 deletions
|
@ -520,8 +520,7 @@ static void free_sampler(struct d3dx_sampler *sampler)
|
|||
{
|
||||
free_state(&sampler->states[i]);
|
||||
}
|
||||
HeapFree(GetProcessHeap(), 0, sampler->states);
|
||||
HeapFree(GetProcessHeap(), 0, sampler);
|
||||
heap_free(sampler->states);
|
||||
}
|
||||
|
||||
static void d3dx_pool_release_shared_parameter(struct d3dx_top_level_parameter *param);
|
||||
|
@ -535,7 +534,7 @@ static void free_parameter_data(struct d3dx_parameter *param, BOOL child)
|
|||
switch (param->type)
|
||||
{
|
||||
case D3DXPT_STRING:
|
||||
HeapFree(GetProcessHeap(), 0, *(char **)param->data);
|
||||
heap_free(*(char **)param->data);
|
||||
break;
|
||||
|
||||
case D3DXPT_TEXTURE:
|
||||
|
@ -561,8 +560,8 @@ static void free_parameter_data(struct d3dx_parameter *param, BOOL child)
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (!child)
|
||||
HeapFree(GetProcessHeap(), 0, param->data);
|
||||
if (!child || is_param_type_sampler(param->type))
|
||||
heap_free(param->data);
|
||||
}
|
||||
|
||||
static void free_parameter(struct d3dx_parameter *param, BOOL element, BOOL child)
|
||||
|
|
|
@ -15,4 +15,4 @@ files: {include/d3dx9.h: sdk/include/dxsdk/d3dx9.h, include/d3dx9anim.h: sdk/inc
|
|||
include/d3dx9mesh.h: sdk/include/dxsdk/d3dx9mesh.h, include/d3dx9of.h: sdk/include/dxsdk/d3dx9of.h,
|
||||
include/d3dx9shader.h: sdk/include/dxsdk/d3dx9shader.h, include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h,
|
||||
include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h, include/d3dx9xof.h: sdk/include/dxsdk/d3dx9xof.h}
|
||||
tags: {wine: a0a5c64bd5d4240d8a7a9913c77730458262d450}
|
||||
tags: {wine: 6aced396bad8bea61733fda24f0cecabaec5041e}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue