destroy renderer when needed (nw)

This commit is contained in:
Miodrag Milanovic 2016-02-21 08:33:39 +01:00
parent f2c514989f
commit ed07fd70ed

View File

@ -1477,6 +1477,7 @@ LRESULT CALLBACK win_window_info::video_window_proc(HWND wnd, UINT message, WPAR
// destroy: clean up all attached rendering bits and nullptr out our hwnd
case WM_DESTROY:
global_free(window->m_renderer);
window->m_renderer = nullptr;
window->m_hwnd = nullptr;
return DefWindowProc(wnd, message, wparam, lparam);