filesystem: dir: fix possible null dereference

This commit is contained in:
Alibek Omarov
2025-04-05 14:03:24 +05:00
parent ea29699633
commit 71d31330f9

View File

@@ -471,6 +471,9 @@ static file_t *FS_OpenFile_DIR( searchpath_t *search, const char *filename, cons
Q_snprintf( path, sizeof( path ), "%s%s", search->filename, filename );
f = FS_SysOpen( path, mode );
if( !f )
return NULL;
f->searchpath = search;
return f;