summaryrefslogtreecommitdiffstats
path: root/src/LV2Features.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-11-17 06:47:24 +0000
committerDavid Robillard <d@drobilla.net>2014-11-17 06:47:24 +0000
commitb9e61de6668c6450d7b28040519ec2cb3b1ad87f (patch)
tree8f713df92343d28ae3676c8dba9431677069334f /src/LV2Features.cpp
parent8d34a6da879f0f8c39dfd4adfa616301fb655f18 (diff)
downloadingen-b9e61de6668c6450d7b28040519ec2cb3b1ad87f.tar.gz
ingen-b9e61de6668c6450d7b28040519ec2cb3b1ad87f.tar.bz2
ingen-b9e61de6668c6450d7b28040519ec2cb3b1ad87f.zip
Fix a few minor/unlikely memory errors.
Handle Glade widget loading failure more gracefully. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5486 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/LV2Features.cpp')
-rw-r--r--src/LV2Features.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/LV2Features.cpp b/src/LV2Features.cpp
index b3600f02..b6765ae3 100644
--- a/src/LV2Features.cpp
+++ b/src/LV2Features.cpp
@@ -35,7 +35,7 @@ LV2Features::add_feature(SPtr<Feature> feature)
LV2Features::FeatureArray::FeatureArray(FeatureVector& features)
: _features(features)
{
- _array = (LV2_Feature**)malloc(sizeof(LV2_Feature) * (features.size() + 1));
+ _array = (LV2_Feature**)malloc(sizeof(LV2_Feature*) * (features.size() + 1));
_array[features.size()] = NULL;
for (size_t i = 0; i < features.size(); ++i) {
_array[i] = features[i].get();