Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix assertion when switching to mod via menu, #458
The assertion that triggered was "assert(iconvDesc == (SDL_iconv_t)-1);" in Sys_InitInput() - because when loading a mod the window is recreated, calling Com_ReloadEngine_f() -> idCommonLocal::InitGame() -> idCommonLocal::InitRenderSystem() -> idCommonLocal::InitOpenGL() -> R_InitOpenGL() -> Sys_InitInput() Before that Com_ReloadEngine_f() calls commonLocal.ShutdownGame( true ); which calls the equivalent Shutdown() functions - except so far no one called Sys_ShutdownInput() (which closes iconvDesc and resets it to -1). Fixed that by making idRenderSystemLocal::ShutdownOpenGL() call it.
- Loading branch information