diff options
-rw-r--r-- | lv2/lv2plug.in/ns/lv2core/lv2_util.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lv2/lv2plug.in/ns/lv2core/lv2_util.h b/lv2/lv2plug.in/ns/lv2core/lv2_util.h index 038b5a6..561e201 100644 --- a/lv2/lv2plug.in/ns/lv2core/lv2_util.h +++ b/lv2/lv2plug.in/ns/lv2core/lv2_util.h @@ -41,9 +41,11 @@ static inline void* lv2_features_data(const LV2_Feature*const* features, const char* const uri) { - for (const LV2_Feature*const* f = features; *f; ++f) { - if (!strcmp(uri, (*f)->URI)) { - return (*f)->data; + if (features) { + for (const LV2_Feature*const* f = features; *f; ++f) { + if (!strcmp(uri, (*f)->URI)) { + return (*f)->data; + } } } return NULL; |