Make sure window->driverdata is set before we might need it.
Thanks to Mako_energy for the fix!
This commit is contained in:
parent
f2923fca25
commit
cf1adee2e4
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
|
@ -183,7 +185,6 @@ SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, SDL_bool created)
|
|||
}
|
||||
|
||||
/* All done! */
|
||||
window->driverdata = data;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue