diff options
author | David Robillard <d@drobilla.net> | 2012-08-13 02:07:05 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-08-13 02:07:05 +0000 |
commit | e09fffd37e2ece404800044c853a42f5ebed9493 (patch) | |
tree | 300746cfb118627232fb1e3a073cf5cc17149ece /src | |
parent | e48bdae0829d6d50eb9bc43b4ed72b0e9922b908 (diff) | |
download | lilv-e09fffd37e2ece404800044c853a42f5ebed9493.tar.gz lilv-e09fffd37e2ece404800044c853a42f5ebed9493.tar.bz2 lilv-e09fffd37e2ece404800044c853a42f5ebed9493.zip |
Fix potential crash when state saving fails.
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@4676 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/state.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/state.c b/src/state.c index c1ff6c0..5b7b64b 100644 --- a/src/state.c +++ b/src/state.c @@ -385,10 +385,11 @@ lilv_state_new_from_instance(const LilvPlugin* plugin, free(state->props); state->props = NULL; state->num_props = 0; + } else { + qsort(state->props, state->num_props, sizeof(Property), property_cmp); } } - qsort(state->props, state->num_props, sizeof(Property), property_cmp); qsort(state->values, state->num_values, sizeof(PortValue), value_cmp); free(sfeatures); |