1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-26 06:28:30 +02: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:
Misa 2023-03-03 16:46:15 -08:00
parent faff8bba5f
commit 33fa0750be

View File

@ -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();