From 4a1457eb1524a180828bfb20fa48ad4a31ff38f3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 10 Jul 2018 21:43:30 +0200 Subject: Handle NULL gracefully in lilv_realpath --- src/util.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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); -- cgit v1.2.1