mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-05 09:49:14 +00:00
HOPKINS: Fix another error reported by Valgrind. Thanks Eriktorbjorn for reporting it
This commit is contained in:
parent
3583a1cdc4
commit
f81ce4d228
@ -67,9 +67,9 @@ LinesManager::LinesManager(HopkinsEngine *vm) {
|
||||
_lastLine = 0;
|
||||
_maxLineIdx = 0;
|
||||
_pathFindingMaxDepth = 0;
|
||||
_testRoute0 = NULL;
|
||||
_testRoute1 = NULL;
|
||||
_testRoute2 = NULL;
|
||||
_testRoute0 = (RouteItem *)g_PTRNUL;
|
||||
_testRoute1 = (RouteItem *)g_PTRNUL;
|
||||
_testRoute2 = (RouteItem *)g_PTRNUL;
|
||||
_lineBuf = (int16 *)g_PTRNUL;
|
||||
_route = (RouteItem *)g_PTRNUL;
|
||||
_currentSegmentId = 0;
|
||||
@ -89,9 +89,12 @@ LinesManager::LinesManager(HopkinsEngine *vm) {
|
||||
|
||||
LinesManager::~LinesManager() {
|
||||
_vm->_globals->freeMemory(_largeBuf);
|
||||
_vm->_globals->freeMemory((byte *) _testRoute0);
|
||||
_vm->_globals->freeMemory((byte *) _testRoute1);
|
||||
_vm->_globals->freeMemory((byte *) _testRoute2);
|
||||
if (_testRoute0 != (RouteItem *)g_PTRNUL)
|
||||
delete[] _testRoute0;
|
||||
if (_testRoute1 != (RouteItem *)g_PTRNUL)
|
||||
delete[] _testRoute1;
|
||||
if (_testRoute2 != (RouteItem *)g_PTRNUL)
|
||||
delete[] _testRoute2;
|
||||
}
|
||||
|
||||
int LigneItem::appendToRouteInc(int from, int to, RouteItem *route, int index) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user