Skip to content

Commit a198c8c

Browse files
committed
Clear extension name pointers after initialization
Since the user might pass a pointer to the stack, we better clear this after we're done with it.
1 parent d95f1d8 commit a198c8c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/gpu/vulkan/SDL_gpu_vulkan.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12401,6 +12401,12 @@ static SDL_GPUDevice *VULKAN_CreateDevice(bool debugMode, bool preferLowPower, S
1240112401
return NULL;
1240212402
}
1240312403

12404+
// Make sure we don't hold onto potentially unsafe pointers after initialization
12405+
renderer->additionalDeviceExtensionCount = 0;
12406+
renderer->additionalInstanceExtensionCount = 0;
12407+
renderer->additionalDeviceExtensionNames = NULL;
12408+
renderer->additionalInstanceExtensionNames = NULL;
12409+
1240412410
renderer->props = SDL_CreateProperties();
1240512411
if (verboseLogs) {
1240612412
SDL_LogInfo(SDL_LOG_CATEGORY_GPU, "SDL_GPU Driver: Vulkan");

0 commit comments

Comments
 (0)