Changeset 2537

Show
Ignore:
Timestamp:
03/07/10 12:37:20 (6 months ago)
Author:
drobilla
Message:

Fix possible premature LV2 features array termination (patch from larsl, fix ticket #493).

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/ingen/src/shared/LV2Features.cpp

    r2533 r2537  
    5454{ 
    5555        FeatureArray::FeatureVector vec; 
    56         for (Features::const_iterator f = _features.begin(); f != _features.end(); ++f) 
    57                 vec.push_back(f->second->feature(node)); 
     56        for (Features::const_iterator f = _features.begin(); f != _features.end(); ++f) { 
     57                SharedPtr<LV2_Feature> fptr = f->second->feature(node); 
     58                if (fptr) 
     59                        vec.push_back(fptr); 
     60        } 
    5861        return SharedPtr<FeatureArray>(new FeatureArray(vec)); 
    5962}