From 1b31fcf1a0cddf81806a153d419af688fe487052 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 7 Mar 2010 20:37:20 +0000 Subject: 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 --- src/shared/LV2Features.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') 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::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 fptr = f->second->feature(node); + if (fptr) + vec.push_back(fptr); + } return SharedPtr(new FeatureArray(vec)); } -- cgit v1.2.1