From ddae20b6899e65456750981ba002e426e6d35539 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Wed, 8 Jan 2014 10:56:15 +0100 Subject: [PATCH] wined3d: Fix up the backbuffer count on failure in swapchain_init(). --- dlls/wined3d/swapchain.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index ff2ac64ebf..40fabc6eba 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -952,6 +952,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3 parent, &surface_desc, &swapchain->back_buffers[i]))) { WARN("Failed to create back buffer %u, hr %#x.\n", i, hr); + swapchain->desc.backbuffer_count = i; goto err; } surface_set_swapchain(swapchain->back_buffers[i], swapchain);