src/video/windows/SDL_windowswindow.c
changeset 8978 7753e4fd3d1d
parent 8953 dc80dc0bd22e
child 9422 286c854c1d5b
equal deleted inserted replaced
8977:84ae33058c67 8978:7753e4fd3d1d
   616 
   616 
   617 void
   617 void
   618 WIN_DestroyWindow(_THIS, SDL_Window * window)
   618 WIN_DestroyWindow(_THIS, SDL_Window * window)
   619 {
   619 {
   620     SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
   620     SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
   621 
       
   622     window->driverdata = NULL;
       
   623 
   621 
   624     if (data) {
   622     if (data) {
   625         ReleaseDC(data->hwnd, data->hdc);
   623         ReleaseDC(data->hwnd, data->hdc);
   626         if (data->created) {
   624         if (data->created) {
   627             DestroyWindow(data->hwnd);
   625             DestroyWindow(data->hwnd);
   637 #endif
   635 #endif
   638             }
   636             }
   639         }
   637         }
   640         SDL_free(data);
   638         SDL_free(data);
   641     }
   639     }
       
   640     window->driverdata = NULL;
   642 }
   641 }
   643 
   642 
   644 SDL_bool
   643 SDL_bool
   645 WIN_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
   644 WIN_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
   646 {
   645 {