Fix minor bug where a null pointer was passed into free() unconditionally

git-svn-id: https://svn.eduke32.com/eduke32@7003 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2018-10-07 05:20:23 +00:00
parent 9157ae2776
commit e449408b57

View file

@ -454,10 +454,7 @@ void G_LoadGroups(int32_t autoload)
g_defNamePtr = dup_filename(type->defname); g_defNamePtr = dup_filename(type->defname);
if (type->rtsname && g_rtsNamePtr == NULL) if (type->rtsname && g_rtsNamePtr == NULL)
{
free(g_rtsNamePtr);
g_rtsNamePtr = dup_filename(type->rtsname); g_rtsNamePtr = dup_filename(type->rtsname);
}
} }
else else
{ {