trivial tweaks: some NULLing pointer after freeing them; move the 'too much mirrors'

check one 'if' down since mirrors are only created when the condition holds

git-svn-id: https://svn.eduke32.com/eduke32@2233 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-01-05 20:48:05 +00:00
parent bb17cff9b7
commit 74b823d6dc
3 changed files with 7 additions and 4 deletions

View file

@ -10158,6 +10158,7 @@ CLEAN_DIRECTORY:
for (i=0; i < g_defModulesNum; ++i)
Bfree(g_defModules[i]);
Bfree(g_defModules);
g_defModules = NULL;
if (numplayers == 1 && boardfilename[0] != 0)
{

View file

@ -5799,6 +5799,7 @@ void C_Compile(const char *filenam)
Bfree(g_scriptModules[i]);
}
Bfree(g_scriptModules);
g_scriptModules = NULL;
flushlogwindow = 1;

View file

@ -1309,10 +1309,11 @@ static inline void prelevel(char g)
{
j = wal->nextsector;
if (g_mirrorCount > 63)
G_GameExit("\nToo many mirrors (64 max.)");
if ((j >= 0) && sector[j].ceilingpicnum != MIRROR)
{
if (g_mirrorCount > 63)
G_GameExit("\nToo many mirrors (64 max.)");
sector[j].ceilingpicnum = MIRROR;
sector[j].floorpicnum = MIRROR;
g_mirrorWall[g_mirrorCount] = i;