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:
bjorn 2021-04-27 22:14:24 -06:00
parent 2a30a7f38d
commit 0a9956db60
1 changed files with 1 additions and 1 deletions

View File

@ -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);