mirror of
https://github.com/bjornbytes/lovr.git
synced 2024-07-04 21:43:34 +00:00
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);
|
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);
|
||||||
|
|
Loading…
Reference in a new issue