1
0
Fork 0
forked from fte/fteqw

Fix demolist/cmd dlist crash when there's no demos.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5454 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2019-05-02 07:10:07 +00:00
parent 1282e487e2
commit 3246a96aa8

View file

@ -2433,7 +2433,7 @@ void SV_MVDList_f (void)
Con_Printf("content of %s/*.mvd\n", sv_demoDir.string);
dir = Sys_listdemos(sv_demoDir.string, true, SORT_BY_DATE);
list = dir->files;
if (!list->name[0])
if (!dir->numfiles)
{
Con_Printf("no demos\n");
}
@ -2485,7 +2485,7 @@ void SV_UserCmdMVDList_f (void)
SV_ClientPrintf(host_client, PRINT_HIGH, "available demos:\n");
dir = Sys_listdemos(sv_demoDir.string, true, SORT_BY_DATE);
list = dir->files;
if (!list->name[0])
if (!dir->numfiles)
{
SV_ClientPrintf(host_client, PRINT_HIGH, "no demos\n");
}
@ -2568,7 +2568,7 @@ void SV_UserCmdMVDList_HTML (vfsfile_t *pipe)
VFS_PRINTF(pipe, "available demos:<br/>\n");
dir = Sys_listdemos(sv_demoDir.string, true, SORT_BY_DATE);
list = dir->files;
if (!list->name[0])
if (!dir->numfiles)
{
VFS_PRINTF(pipe, "no demos<br/>\n");
}