Fix a OpenGL backend DeleteTexture crash
This commit is contained in:
parent
99c773f39e
commit
e9213b2b41
|
@ -1301,8 +1301,12 @@ EXPORT void HWRAPI(DeleteTexture) (GLMipmap_t *pTexInfo)
|
||||||
{
|
{
|
||||||
if (head->next)
|
if (head->next)
|
||||||
head->next->prev = head->prev;
|
head->next->prev = head->prev;
|
||||||
|
else // no next -> tail is being deleted -> update TexCacheTail
|
||||||
|
TexCacheTail = head->prev;
|
||||||
if (head->prev)
|
if (head->prev)
|
||||||
head->prev->next = head->next;
|
head->prev->next = head->next;
|
||||||
|
else // no prev -> head is being deleted -> update TexCacheHead
|
||||||
|
TexCacheHead = head->next;
|
||||||
free(head);
|
free(head);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue