From 2188caae8ebd159a26cbc56ff6087e877c289015 Mon Sep 17 00:00:00 2001 From: Sanakan8472 Date: Thu, 6 Jun 2024 22:14:53 +0200 Subject: [PATCH] Fix GLFW exception at startup `GlfwWsiDriver::getInstanceExtensions` was creating an `std::vector` with a size argument in the ctor but then used `push_back` instead of filling the pre-allocated elements, leading to a bunch of nullptr entries at the start that caused an exception later on when accessed. --- src/wsi/glfw/wsi_platform_glfw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wsi/glfw/wsi_platform_glfw.cpp b/src/wsi/glfw/wsi_platform_glfw.cpp index ee818bb20..62d7271af 100644 --- a/src/wsi/glfw/wsi_platform_glfw.cpp +++ b/src/wsi/glfw/wsi_platform_glfw.cpp @@ -44,7 +44,7 @@ namespace dxvk::wsi { if (extensionCount == 0) throw DxvkError(str::format("GLFW WSI: Failed to get required instance extensions")); - std::vector names(extensionCount); + std::vector names; for (uint32_t i = 0; i < extensionCount; ++i) { names.push_back(extensionArray[i]); }