mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2024-12-27 07:15:31 +03:00
Fix MapEdit memory errors
deleteThis() was called on NULL pointers. Deleting individual nodes shouldn't be necessary if the whole structure (pkvFile) is deleted anyways.
This commit is contained in:
parent
098486fbe4
commit
78ef9f2019
@ -409,7 +409,6 @@ public:
|
||||
|
||||
pkvClassname = pkvClassname->GetNextKey();
|
||||
}
|
||||
pkvClassname->deleteThis();
|
||||
}
|
||||
else if (FStrEq(pNodeName, "edit"))
|
||||
{
|
||||
@ -432,7 +431,6 @@ public:
|
||||
|
||||
pName = pName->GetNextKey();
|
||||
}
|
||||
pName->deleteThis();
|
||||
}
|
||||
else if (FStrEq(pNodeName, "delete"))
|
||||
{
|
||||
@ -455,7 +453,6 @@ public:
|
||||
|
||||
pName = pName->GetNextKey();
|
||||
}
|
||||
pName->deleteThis();
|
||||
}
|
||||
else if (FStrEq(pNodeName, "fire"))
|
||||
{
|
||||
@ -525,12 +522,10 @@ public:
|
||||
|
||||
pkvNodeData = pkvNodeData->GetNextKey();
|
||||
}
|
||||
pkvNodeData->deleteThis();
|
||||
}
|
||||
|
||||
pkvNode = pkvNode->GetNextKey();
|
||||
}
|
||||
pkvNode->deleteThis();
|
||||
}
|
||||
|
||||
void SpawnMapEdit(const char *pFile = NULL)
|
||||
@ -889,8 +884,8 @@ void CC_MapEdit_Print( const CCommand& args )
|
||||
pkvNode = pkvNode->GetNextKey();
|
||||
}
|
||||
|
||||
pkvNode->deleteThis();
|
||||
}
|
||||
pkvFile->deleteThis();
|
||||
}
|
||||
}
|
||||
static ConCommand mapedit_print("mapedit_print", CC_MapEdit_Print, "Prints a mapedit file in the console.");
|
||||
|
Loading…
Reference in New Issue
Block a user