wined3d: Move texture reference decrement to end of usage (Coverity).

This commit is contained in:
Marcus Meissner 2012-09-29 11:14:54 +02:00 committed by Alexandre Julliard
parent ae72b21641
commit 8ec6ebe4fb
1 changed files with 2 additions and 2 deletions

View File

@ -3524,8 +3524,6 @@ HRESULT CDECL wined3d_device_set_texture(struct wined3d_device *device,
{
LONG bind_count = InterlockedDecrement(&prev->resource.bind_count);
wined3d_texture_decref(prev);
if (!texture && stage < gl_info->limits.texture_stages)
{
device_invalidate_state(device, STATE_TEXTURESTAGE(stage, WINED3D_TSS_COLOR_OP));
@ -3549,6 +3547,8 @@ HRESULT CDECL wined3d_device_set_texture(struct wined3d_device *device,
}
}
}
wined3d_texture_decref(prev);
}
device_invalidate_state(device, STATE_SAMPLER(stage));