mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Destroy gameScreen after all other graphics are destroyed
This is because destroying the renderer causes use-after-frees since the renderer destroys all textures when it gets destroyed. This fixes a Valgrind error where an invalid read occurs because the font textures get destroyed again after the renderer is destroyed.
This commit is contained in:
@@ -823,9 +823,9 @@ static void cleanup(void)
|
||||
|
||||
graphics.grphx.destroy();
|
||||
graphics.destroy_buffers();
|
||||
gameScreen.destroy();
|
||||
graphics.destroy();
|
||||
font::destroy();
|
||||
gameScreen.destroy();
|
||||
music.destroy();
|
||||
map.destroy();
|
||||
NETWORK_shutdown();
|
||||
|
||||
Reference in New Issue
Block a user