summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index 66ac7f3..b600586 100644
--- a/src/util.c
+++ b/src/util.c
@@ -428,6 +428,10 @@ lilv_get_latest_copy(const char* path, const char* copy_path)
char*
lilv_realpath(const char* path)
{
+ if (!path) {
+ return NULL;
+ }
+
#if defined(_WIN32)
char* out = (char*)malloc(MAX_PATH);
GetFullPathName(path, MAX_PATH, out, NULL);