summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-03-07 20:37:20 +0000
committerDavid Robillard <d@drobilla.net>2010-03-07 20:37:20 +0000
commit1b31fcf1a0cddf81806a153d419af688fe487052 (patch)
tree0eb44e7fda99318f0a1f77b4a8214f456138af53 /src
parent32ed8eb92f194d0cce1b0617d0686147d4be09c0 (diff)
downloadingen-1b31fcf1a0cddf81806a153d419af688fe487052.tar.gz
ingen-1b31fcf1a0cddf81806a153d419af688fe487052.tar.bz2
ingen-1b31fcf1a0cddf81806a153d419af688fe487052.zip
Fix possible premature LV2 features array termination (patch from larsl, fix ticket #493).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2537 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/shared/LV2Features.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/shared/LV2Features.cpp b/src/shared/LV2Features.cpp
index 21d6039e..f714c0ac 100644
--- a/src/shared/LV2Features.cpp
+++ b/src/shared/LV2Features.cpp
@@ -53,8 +53,11 @@ SharedPtr<LV2Features::FeatureArray>
LV2Features::lv2_features(Node* node) const
{
FeatureArray::FeatureVector vec;
- for (Features::const_iterator f = _features.begin(); f != _features.end(); ++f)
- vec.push_back(f->second->feature(node));
+ for (Features::const_iterator f = _features.begin(); f != _features.end(); ++f) {
+ SharedPtr<LV2_Feature> fptr = f->second->feature(node);
+ if (fptr)
+ vec.push_back(fptr);
+ }
return SharedPtr<FeatureArray>(new FeatureArray(vec));
}