[nq,qw] Call Mod_ClearAll in CL_Shutdown

Although the model subsystem does this too, it does it too late relative
to the video shutdown, resulting in segfaults for glsl due to the
drivers having been unloaded.
This commit is contained in:
Bill Currie 2023-10-03 14:26:54 +09:00
parent ba35ce71b3
commit 7f3fc6d832
3 changed files with 5 additions and 0 deletions

View file

@ -161,6 +161,7 @@ mod_unload_model (size_t ind)
//with alias models
if (!mod->needload && mod->clear) {
mod->clear (mod, mod->data);
mod->clear = 0;
}
if (mod->type != mod_alias) {
mod->needload = true;

View file

@ -216,6 +216,8 @@ static void
CL_Shutdown (void *data)
{
CL_WriteConfiguration ();
Mod_ClearAll ();
}
void

View file

@ -1440,6 +1440,8 @@ CL_Shutdown (void *data)
dstring_delete (cls.downloadname);
dstring_delete (cls.downloadurl);
free (cl.players);
Mod_ClearAll ();
}
void