Fix SDLTexture backend's linked-list
Was causing some use-after-free behaviour, according to valgrind. Should fix #87
This commit is contained in:
parent
1cc3d7fe30
commit
df534bb612
1 changed files with 3 additions and 0 deletions
|
@ -116,6 +116,9 @@ Backend_Surface* Backend_CreateSurface(unsigned int width, unsigned int height)
|
|||
surface->next = surface_list_head;
|
||||
surface_list_head = surface;
|
||||
|
||||
if (surface->next != NULL)
|
||||
surface->next->prev = surface;
|
||||
|
||||
return surface;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue