diff --git a/src/video/windows/SDL_windowswindow.c b/src/video/windows/SDL_windowswindow.c index c28da5204..07b873f7f 100644 --- a/src/video/windows/SDL_windowswindow.c +++ b/src/video/windows/SDL_windowswindow.c @@ -113,7 +113,7 @@ SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, SDL_bool created) SDL_WindowData *data; /* Allocate the window data */ - data = (SDL_WindowData *) SDL_malloc(sizeof(*data)); + data = (SDL_WindowData *) SDL_calloc(1, sizeof(*data)); if (!data) { return SDL_OutOfMemory(); }