diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/state.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/state.c b/src/state.c index 9ab441f..b2953a4 100644 --- a/src/state.c +++ b/src/state.c @@ -411,8 +411,8 @@ lilv_state_restore(const LilvState* state, const LV2_Feature** sfeatures = add_features(features, &map_feature, NULL); - const LV2_Descriptor* desc = instance->lv2_descriptor; - const LV2_State_Interface* iface = (desc->extension_data) + const LV2_Descriptor* desc = instance ? instance->lv2_descriptor : NULL; + const LV2_State_Interface* iface = (desc && desc->extension_data) ? (LV2_State_Interface*)desc->extension_data(LV2_STATE__interface) : NULL; |