1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-02 12:33:52 +00:00

Fix memory leak in pass lookup;

This commit is contained in:
bjorn 2024-01-17 15:48:34 -08:00
parent 65f1370314
commit dfa231ebc0

View file

@ -879,7 +879,9 @@ void lovrGraphicsDestroy(void) {
map_free(&state.pipelineLookup); map_free(&state.pipelineLookup);
for (size_t i = 0; i < state.passLookup.size; i++) { for (size_t i = 0; i < state.passLookup.size; i++) {
if (state.passLookup.values[i] != MAP_NIL) { if (state.passLookup.values[i] != MAP_NIL) {
gpu_pass_destroy((gpu_pass*) (uintptr_t) state.passLookup.values[i]); gpu_pass* pass = (gpu_pass*) (uintptr_t) state.passLookup.values[i];
gpu_pass_destroy(pass);
free(pass);
} }
} }
map_free(&state.passLookup); map_free(&state.passLookup);