summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS5
-rw-r--r--lilv.pc.in2
-rw-r--r--src/state.c10
3 files changed, 10 insertions, 7 deletions
diff --git a/NEWS b/NEWS
index b6b49a3..f4a8ce7 100644
--- a/NEWS
+++ b/NEWS
@@ -1,9 +1,10 @@
lilv (0.20.1) unstable;
+ * Tolerate passing NULL to lilv_state_restore()
* Configure based on compiler target OS for cross-compilation
- * Minor documentation improvements.
+ * Minor documentation improvements
- -- David Robillard <d@drobilla.net> Sat, 04 Oct 2014 23:06:19 -0400
+ -- David Robillard <d@drobilla.net> Sat, 04 Oct 2014 23:27:33 -0400
lilv (0.20.0) stable;
diff --git a/lilv.pc.in b/lilv.pc.in
index beff7ca..b6d745f 100644
--- a/lilv.pc.in
+++ b/lilv.pc.in
@@ -7,5 +7,5 @@ Name: Lilv
Version: @LILV_VERSION@
Description: Simple C library for hosting LV2 plugins
Requires: lv2 @PKG_serd_0@ @PKG_sord_0@ @PKG_sratom_0@
-Libs: -L${libdir} -l@LIB_LILV@ -ldl
+Libs: -L${libdir} -l@LIB_LILV@ @LILV_PKG_LIBS@ -ldl
Cflags: -I${includedir}/lilv-@LILV_MAJOR_VERSION@
diff --git a/src/state.c b/src/state.c
index 68d48f1..7968493 100644
--- a/src/state.c
+++ b/src/state.c
@@ -403,6 +403,11 @@ lilv_state_restore(const LilvState* state,
uint32_t flags,
const LV2_Feature *const * features)
{
+ if (!state) {
+ LILV_ERROR("lilv_state_restore() called on NULL state\n");
+ return;
+ }
+
LV2_State_Map_Path map_path = {
(LilvState*)state, abstract_path, absolute_path };
LV2_Feature map_feature = { LV2_STATE__mapPath, &map_path };
@@ -581,10 +586,7 @@ lilv_state_new_from_world(LilvWorld* world,
return NULL;
}
- LilvState* state = new_state_from_model(
- world, map, world->model, node->node, NULL);
-
- return state;
+ return new_state_from_model(world, map, world->model, node->node, NULL);
}
LILV_API LilvState*