From c23fb235c8ed9eda0949e4b63de4ac7048dc236b Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Fri, 16 Sep 2022 17:20:56 +0300 Subject: [PATCH] SDL_render_d3d12.c: Fix uninitialized warning for CreateEventExFunc --- src/render/direct3d12/SDL_render_d3d12.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/render/direct3d12/SDL_render_d3d12.c b/src/render/direct3d12/SDL_render_d3d12.c index 832d4c8f7..3fde465b6 100644 --- a/src/render/direct3d12/SDL_render_d3d12.c +++ b/src/render/direct3d12/SDL_render_d3d12.c @@ -757,6 +757,7 @@ D3D12_CreateDeviceResources(SDL_Renderer* renderer) /* CreateEventEx() arrived in Vista, so we need to load it with GetProcAddress for XP. */ { HMODULE kernel32 = GetModuleHandle(TEXT("kernel32.dll")); + CreateEventExFunc = NULL; if (kernel32) { CreateEventExFunc = (PFN_CREATE_EVENT_EX) GetProcAddress(kernel32, "CreateEventExW"); }