Skip to content

Commit fece07e

Browse files
Fix swapchain out of bounds (maplibre#3486)
1 parent 8e3899d commit fece07e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/mbgl/vulkan/renderable_resource.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ void SurfaceRenderableResource::initSwapchain(uint32_t w, uint32_t h) {
160160
colorFormat = swapchainCreateInfo.imageFormat;
161161
extent = swapchainCreateInfo.imageExtent;
162162

163-
swapchainSemaphores.reserve(swapchainImageCount);
164-
for (uint32_t index = 0; index < swapchainImageCount; ++index) {
163+
swapchainSemaphores.reserve(swapchainImages.size());
164+
for (uint32_t index = 0; index < swapchainImages.size(); ++index) {
165165
swapchainSemaphores.emplace_back(device->createSemaphoreUnique({}));
166166
backend.setDebugName(swapchainSemaphores.back().get(), "SurfaceSemaphore_" + std::to_string(index));
167167
}

0 commit comments

Comments
 (0)