mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 09:22:43 +00:00
Fix the segfault on leaving e1m2.
Problem and solution found by Deek, reason by me.
This commit is contained in:
parent
c3d2365bd8
commit
1052bd2624
1 changed files with 2 additions and 1 deletions
|
@ -65,7 +65,8 @@ glsl_brush_clear (model_t *m)
|
|||
|
||||
m->needload = true;
|
||||
for (i = 0; i < m->numtextures; i++) {
|
||||
if (m->textures[i]->gl_texturenum) {
|
||||
// NOTE: some maps (eg e1m2) have empty texture slots
|
||||
if (m->textures[i] && m->textures[i]->gl_texturenum) {
|
||||
GL_ReleaseTexture (m->textures[i]->gl_texturenum);
|
||||
m->textures[i]->gl_texturenum = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue