diff --git a/src/tools/fs_shell/string.cpp b/src/tools/fs_shell/string.cpp index 3ecb73c1d9..da431d65cc 100644 --- a/src/tools/fs_shell/string.cpp +++ b/src/tools/fs_shell/string.cpp @@ -219,6 +219,8 @@ fssh_strcasestr(const char *string, const char *searchString) char* fssh_strdup(const char *string) { + if (!string) + return NULL; return strdup(string); }