summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-10-29 14:23:37 +0000
committerDavid Robillard <d@drobilla.net>2015-10-29 14:23:37 +0000
commit942a2cd4d60736fca53944517cf522ca37c31bc0 (patch)
tree021743d23d103da9cd9627ddd370a15d567ec508 /src
parentcfad5fc11b60071045e85ec40d86f82680aa55e4 (diff)
downloadlilv-942a2cd4d60736fca53944517cf522ca37c31bc0.tar.gz
lilv-942a2cd4d60736fca53944517cf522ca37c31bc0.tar.bz2
lilv-942a2cd4d60736fca53944517cf522ca37c31bc0.zip
Fix restoring plugins with no state interface
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@5802 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/state.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/state.c b/src/state.c
index dbbcdd0..15de044 100644
--- a/src/state.c
+++ b/src/state.c
@@ -436,13 +436,15 @@ lilv_state_restore(const LilvState* state,
const LV2_State_Interface* iface = (const LV2_State_Interface*)
desc->extension_data(LV2_STATE__interface);
- const LV2_Feature** sfeatures = add_features(
- features, &map_feature, NULL);
+ if (iface && iface->restore) {
+ const LV2_Feature** sfeatures = add_features(
+ features, &map_feature, NULL);
- iface->restore(instance->lv2_handle, retrieve_callback,
- (LV2_State_Handle)state, flags, sfeatures);
+ iface->restore(instance->lv2_handle, retrieve_callback,
+ (LV2_State_Handle)state, flags, sfeatures);
- free(sfeatures);
+ free(sfeatures);
+ }
}
}