mirror of https://github.com/bjornbytes/lovr.git
Fix memory leak in pass lookup;
This commit is contained in:
parent
65f1370314
commit
dfa231ebc0
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue