wined3d: Avoid accessing freed memory in wined3d_view_gl_destroy() (Valgrind).

Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Liam Middlebrook <lmiddlebrook@nvidia.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 4128e457a9)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
stable
Sven Baars 2020-02-02 14:45:51 +01:00 committed by Michael Stefaniuc
parent 37a1205885
commit 1653bff666
1 changed files with 1 additions and 1 deletions

View File

@ -4851,7 +4851,7 @@ static void wined3d_view_gl_destroy(struct wined3d_device *device,
ctx->free = ctx != &c ? ctx : NULL;
wined3d_cs_destroy_object(device->cs, wined3d_view_gl_destroy_object, ctx);
if (!ctx->free)
if (ctx == &c)
device->cs->ops->finish(device->cs, WINED3D_CS_QUEUE_DEFAULT);
}