summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-07-10 21:43:30 +0200
committerDavid Robillard <d@drobilla.net>2018-07-10 21:43:30 +0200
commit4a1457eb1524a180828bfb20fa48ad4a31ff38f3 (patch)
treeb913a67cc7c07505633b0cfdfdfc37089d938ae3 /src
parent13285959bcc37effa66d69a7607976accc51abe2 (diff)
downloadlilv-4a1457eb1524a180828bfb20fa48ad4a31ff38f3.tar.gz
lilv-4a1457eb1524a180828bfb20fa48ad4a31ff38f3.tar.bz2
lilv-4a1457eb1524a180828bfb20fa48ad4a31ff38f3.zip
Handle NULL gracefully in lilv_realpath
Diffstat (limited to 'src')
-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);