Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Make sure window->driverdata is set before we might need it.
Browse files Browse the repository at this point in the history
Thanks to Mako_energy for the fix!
  • Loading branch information
icculus committed Oct 13, 2011
1 parent ccf0b2d commit 32ebb0d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/video/windows/SDL_windowswindow.c
Expand Up @@ -88,6 +88,8 @@ SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, SDL_bool created)
data->mouse_pressed = SDL_FALSE;
data->videodata = videodata;

window->driverdata = data;

/* Associate the data with the window */
if (!SetProp(hwnd, TEXT("SDL_WindowData"), data)) {
ReleaseDC(hwnd, data->hdc);
Expand Down Expand Up @@ -183,7 +185,6 @@ SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, SDL_bool created)
}

/* All done! */
window->driverdata = data;
return 0;
}

Expand Down

0 comments on commit 32ebb0d

Please sign in to comment.