Don't leak azimuth model objects

This commit is contained in:
Aaron Culliney 2016-02-19 20:00:42 -08:00
parent efcf0afa4e
commit 699f4697df

View File

@ -353,6 +353,7 @@ static void gltouchjoy_setup(void) {
resetState();
mdlDestroyModel(&axes.model);
mdlDestroyModel(&axes.azimuthModel);
mdlDestroyModel(&buttons.model);
joyglobals.isShuttingDown = false;
@ -382,7 +383,7 @@ static void gltouchjoy_setup(void) {
return;
}
// axis aximuth object
// axis azimuth object
bool azimuthError = true;
do {
@ -467,6 +468,7 @@ static void gltouchjoy_shutdown(void) {
variant.kpad->shutdown();
mdlDestroyModel(&axes.model);
mdlDestroyModel(&axes.azimuthModel);
mdlDestroyModel(&buttons.model);
}