diff --git a/src/platform/test/cinema-main.c b/src/platform/test/cinema-main.c index 29c10c452..2a9206f65 100644 --- a/src/platform/test/cinema-main.c +++ b/src/platform/test/cinema-main.c @@ -767,8 +767,10 @@ int main(int argc, char** argv) { } #ifndef _WIN32 char* rbase = realpath(base, NULL); - strncpy(base, rbase, PATH_MAX); - free(rbase); + if (rbase) { + strncpy(base, rbase, PATH_MAX); + free(rbase); + } #endif struct CInemaTestList tests;