mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-20 21:16:04 +00:00
GPU Metal: Fix uninitialized memory
This commit is contained in:
parent
2010a22f44
commit
00708b976a
1 changed files with 1 additions and 1 deletions
|
|
@ -3407,7 +3407,7 @@ static bool METAL_ClaimWindow(
|
|||
MetalWindowData *windowData = METAL_INTERNAL_FetchWindowData(window);
|
||||
|
||||
if (windowData == NULL) {
|
||||
windowData = (MetalWindowData *)SDL_malloc(sizeof(MetalWindowData));
|
||||
windowData = (MetalWindowData *)SDL_calloc(1, sizeof(MetalWindowData));
|
||||
windowData->window = window;
|
||||
|
||||
if (METAL_INTERNAL_CreateSwapchain(renderer, windowData, SDL_GPU_SWAPCHAINCOMPOSITION_SDR, SDL_GPU_PRESENTMODE_VSYNC)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue