mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Merge branch 'gl-deletetexture-fix' into 'next'
Fix a OpenGL backend DeleteTexture crash (Fixes #499) Closes #499 See merge request STJr/SRB2!1448
This commit is contained in:
commit
d18ef87465
1 changed files with 4 additions and 0 deletions
|
@ -1301,8 +1301,12 @@ EXPORT void HWRAPI(DeleteTexture) (GLMipmap_t *pTexInfo)
|
|||
{
|
||||
if (head->next)
|
||||
head->next->prev = head->prev;
|
||||
else // no next -> tail is being deleted -> update TexCacheTail
|
||||
TexCacheTail = head->prev;
|
||||
if (head->prev)
|
||||
head->prev->next = head->next;
|
||||
else // no prev -> head is being deleted -> update TexCacheHead
|
||||
TexCacheHead = head->next;
|
||||
free(head);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue