diff vamp-sdk/PluginAdapter.cpp @ 40:ae3e47e76d2d

* Add plugin path traversal and plugin listing option to vamp-simple-host * Add more notes on plugin lookup and categorisation
author cannam
date Mon, 09 Oct 2006 12:45:14 +0000
parents db01ce9e7657
children be8fdfe25693
line wrap: on
line diff
--- a/vamp-sdk/PluginAdapter.cpp	Thu Sep 21 16:41:10 2006 +0000
+++ b/vamp-sdk/PluginAdapter.cpp	Mon Oct 09 12:45:14 2006 +0000
@@ -410,8 +410,12 @@
     if (desc->name) free((void *)desc->name);
     if (desc->description) free((void *)desc->description);
     if (desc->unit) free((void *)desc->unit);
-    for (unsigned int i = 0; i < desc->binCount; ++i) {
-        free((void *)desc->binNames[i]);
+    if (desc->hasFixedBinCount && desc->binNames) {
+        for (unsigned int i = 0; i < desc->binCount; ++i) {
+            if (desc->binNames[i]) {
+                free((void *)desc->binNames[i]);
+            }
+        }
     }
     if (desc->binNames) free((void *)desc->binNames);
     free((void *)desc);