mirror of https://github.com/bjornbytes/lovr.git
phonon: Fix crash when setGeometry fails;
The call to `free` above was fixed, but the one in the error case was not.
This commit is contained in:
parent
2a30a7f38d
commit
0a9956db60
|
@ -360,7 +360,7 @@ bool phonon_setGeometry(float* vertices, uint32_t* indices, uint32_t vertexCount
|
|||
return true;
|
||||
|
||||
fail:
|
||||
free(materials);
|
||||
free(triangleMaterials);
|
||||
if (state.mesh) phonon_iplDestroyStaticMesh(&state.mesh);
|
||||
if (state.scene) phonon_iplDestroyScene(&state.scene);
|
||||
if (state.environment) phonon_iplDestroyEnvironment(&state.environment);
|
||||
|
|
Loading…
Reference in New Issue