1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-19 14:52:10 +01:00

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.
This commit is contained in:
Sanakan8472 2024-06-06 22:14:53 +02:00 committed by Philip Rebohle
parent 8d965359a5
commit 2188caae8e

View File

@ -44,7 +44,7 @@ namespace dxvk::wsi {
if (extensionCount == 0)
throw DxvkError(str::format("GLFW WSI: Failed to get required instance extensions"));
std::vector<const char *> names(extensionCount);
std::vector<const char *> names;
for (uint32_t i = 0; i < extensionCount; ++i) {
names.push_back(extensionArray[i]);
}