mirror of
https://github.com/yawut/SDL.git
synced 2026-08-26 18:55:32 -05:00
Make sure window->driverdata is set before we might need it.
Thanks to Mako_energy for the fix!
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user