1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

core: check that directory is not NULL in function plugin_api_info_absolute_path

This commit is contained in:
Sébastien Helleu
2023-12-02 09:37:22 +01:00
parent de5b0aae47
commit 51fec9257e
+1 -1
View File
@@ -197,7 +197,7 @@ plugin_api_info_absolute_path (const char *directory)
{
char absolute_path[PATH_MAX];
if (!realpath (directory, absolute_path))
if (!directory || !realpath (directory, absolute_path))
return NULL;
return strdup ((absolute_path[0]) ? absolute_path : directory);
}