wined3d: Properly check whether a context was created in swapchain_init().

This fixes commit db20107265, but the underlying
issue was of course present before that commit.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2019-06-03 18:10:23 +04:30 committed by Alexandre Julliard
parent de035b71ab
commit d88c403e54
1 changed files with 1 additions and 1 deletions

View File

@ -904,7 +904,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
wined3d_cs_init_object(device->cs, wined3d_swapchain_cs_init, swapchain);
wined3d_cs_finish(device->cs, WINED3D_CS_QUEUE_DEFAULT);
if (!swapchain->context[0])
if (!swapchain->num_contexts)
{
hr = WINED3DERR_NOTAVAILABLE;
goto err;