summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/state.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/state.c b/src/state.c
index a1c5d3c..914ff5b 100644
--- a/src/state.c
+++ b/src/state.c
@@ -1301,7 +1301,9 @@ lilv_state_delete(LilvWorld* world,
// Remove state file
const uint8_t* uri = sord_node_get_string(file);
char* path = (char*)serd_file_uri_parse(uri, NULL);
- try_unlink(state->dir, path);
+ if (path) {
+ try_unlink(state->dir, path);
+ }
serd_free(path);
}