[coverity] folder_select.c find_from_filename() guard against NULL

its pretty doubtful you wouldn't find a slash in a folder path

Change-Id: Ibf2069f37c235716d4d90aec6d68410a93c2bdc6
This commit is contained in:
William Wilgus 2024-06-05 23:38:25 -04:00
parent c6473f4e7f
commit f9b15d951c

View file

@ -482,7 +482,7 @@ static struct child* find_from_filename(const char* filename, struct folder *roo
cascade:
/* filename == XXX/YYY. cascade down */
child_set_state_expand(this, root);
while (slash[0] == '/') slash++; /* eat slashes */
while (slash && slash[0] == '/') slash++; /* eat slashes */
return find_from_filename(slash, this->folder);
}