Skip to content

Commit

Permalink
Fixed bug 2130 - Two members of Windows WindowData not initialized
Browse files Browse the repository at this point in the history
norfanin

SetupWindowData in SDL_windowswindow.c doesn't initialize two members of SDL_WindowData with NULL. This is an issue because other parts of the SDL code seem to make the assumption that this is the case. WIN_DestroyWindowFramebuffer for example uses data->mdc and data->hbm if they're not NULL.
  • Loading branch information
slouken committed Oct 3, 2013
1 parent ce45fa2 commit 8fbd7dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/video/windows/SDL_windowswindow.c
Expand Up @@ -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();
}
Expand Down

0 comments on commit 8fbd7dc

Please sign in to comment.