Fixed open_streamfile_by_filename crashing if empty filename is passed

This commit is contained in:
NicknineTheEagle 2020-09-29 15:10:45 +03:00
parent 8e04679fa9
commit 975958b5a9

View File

@ -890,7 +890,7 @@ STREAMFILE* open_streamfile_by_filename(STREAMFILE *streamfile, const char * fil
char partname[PATH_LIMIT];
char *path, *name;
if (!streamfile || !filename) return NULL;
if (!streamfile || !filename || !filename[0]) return NULL;
streamfile->get_name(streamfile, fullname, sizeof(fullname));