Fix memory leak in pass lookup;

This commit is contained in:
bjorn 2024-01-17 15:48:34 -08:00
parent 65f1370314
commit dfa231ebc0
1 changed files with 3 additions and 1 deletions

View File

@ -879,7 +879,9 @@ void lovrGraphicsDestroy(void) {
map_free(&state.pipelineLookup);
for (size_t i = 0; i < state.passLookup.size; i++) {
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);