Changeset 942a2cd in lilv


Ignore:
Timestamp:
10/29/15 07:23:37 (22 months ago)
Author:
David Robillard <d@…>
Branches:
master
Children:
432be40
Parents:
cfad5fc
Message:

Fix restoring plugins with no state interface

git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@5802 a436a847-0d15-0410-975c-d299462d15a1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/state.c

    rcfad5fc r942a2cd  
    437437                desc->extension_data(LV2_STATE__interface); 
    438438 
    439             const LV2_Feature** sfeatures = add_features( 
    440                 features, &map_feature, NULL); 
    441  
    442             iface->restore(instance->lv2_handle, retrieve_callback, 
    443                            (LV2_State_Handle)state, flags, sfeatures); 
    444  
    445             free(sfeatures); 
     439            if (iface && iface->restore) { 
     440                const LV2_Feature** sfeatures = add_features( 
     441                    features, &map_feature, NULL); 
     442 
     443                iface->restore(instance->lv2_handle, retrieve_callback, 
     444                               (LV2_State_Handle)state, flags, sfeatures); 
     445 
     446                free(sfeatures); 
     447            } 
    446448        } 
    447449    } 
Note: See TracChangeset for help on using the changeset viewer.