Commit cf1adee2 authored by Ryan C. Gordon's avatar Ryan C. Gordon

Make sure window->driverdata is set before we might need it.

Thanks to Mako_energy for the fix!
parent f2923fca
...@@ -88,6 +88,8 @@ SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, SDL_bool created) ...@@ -88,6 +88,8 @@ SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, SDL_bool created)
data->mouse_pressed = SDL_FALSE; data->mouse_pressed = SDL_FALSE;
data->videodata = videodata; data->videodata = videodata;
window->driverdata = data;
/* Associate the data with the window */ /* Associate the data with the window */
if (!SetProp(hwnd, TEXT("SDL_WindowData"), data)) { if (!SetProp(hwnd, TEXT("SDL_WindowData"), data)) {
ReleaseDC(hwnd, data->hdc); ReleaseDC(hwnd, data->hdc);
...@@ -183,7 +185,6 @@ SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, SDL_bool created) ...@@ -183,7 +185,6 @@ SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, SDL_bool created)
} }
/* All done! */ /* All done! */
window->driverdata = data;
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment