Commit 918d8540 authored by Sam Lantinga's avatar Sam Lantinga

Fixed list loop caused when there are two entries in the list and the one...

Fixed list loop caused when there are two entries in the list and the one being returned is already at the head.
parent c5b4e5f6
...@@ -470,7 +470,7 @@ GLES2_CacheProgram(SDL_Renderer *renderer, GLES2_ShaderCacheEntry *vertex, ...@@ -470,7 +470,7 @@ GLES2_CacheProgram(SDL_Renderer *renderer, GLES2_ShaderCacheEntry *vertex,
} }
if (entry) if (entry)
{ {
if (rdata->program_cache.count > 1) if (rdata->program_cache.head != entry)
{ {
if (entry->next) if (entry->next)
entry->next->prev = entry->prev; entry->next->prev = entry->prev;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment