mirror of
https://github.com/mikeoliphant/neural-amp-modeler-lv2.git
synced 2026-06-24 12:57:35 +02:00
Use lv2 freePath to free path data
This commit is contained in:
+7
-6
@@ -219,9 +219,10 @@ namespace NAM {
|
|||||||
store(handle, nam->uris.model_Path, apath, strlen(apath) + 1, nam->uris.atom_Path,
|
store(handle, nam->uris.model_Path, apath, strlen(apath) + 1, nam->uris.atom_Path,
|
||||||
LV2_STATE_IS_POD | LV2_STATE_IS_PORTABLE);
|
LV2_STATE_IS_POD | LV2_STATE_IS_PORTABLE);
|
||||||
|
|
||||||
#ifndef _WIN32 // https://github.com/drobilla/lilv/issues/14
|
LV2_State_Free_Path* free_path = (LV2_State_Free_Path *)lv2_features_data(features, LV2_STATE__freePath);
|
||||||
free(apath);
|
|
||||||
#endif
|
free_path->free_path(free_path->handle, apath);
|
||||||
|
|
||||||
return LV2_STATE_SUCCESS;
|
return LV2_STATE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -271,9 +272,9 @@ namespace NAM {
|
|||||||
result = LV2_STATE_ERR_UNKNOWN;
|
result = LV2_STATE_ERR_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _WIN32 // https://github.com/drobilla/lilv/issues/14
|
LV2_State_Free_Path* free_path = (LV2_State_Free_Path*)lv2_features_data(features, LV2_STATE__freePath);
|
||||||
free(path);
|
|
||||||
#endif
|
free_path->free_path(free_path->handle, path);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user