BGE: Fixing memory leaks when deactivating Sensors, Controllers, or actuators.
Found by Coverity and confirmed with Valgrind.
This commit is contained in:
parent
a51a0ca772
commit
b4cb467359
@ -1122,6 +1122,8 @@ void BL_ConvertActuators(const char* maggiename,
|
||||
// done with baseact, release it
|
||||
baseact->Release();
|
||||
}
|
||||
else if (baseact)
|
||||
baseact->Release();
|
||||
|
||||
bact = bact->next;
|
||||
}
|
||||
|
@ -240,6 +240,8 @@ void BL_ConvertControllers(
|
||||
//done with gamecontroller
|
||||
gamecontroller->Release();
|
||||
}
|
||||
else if (gamecontroller)
|
||||
gamecontroller->Release();
|
||||
|
||||
bcontr = bcontr->next;
|
||||
}
|
||||
|
@ -640,6 +640,9 @@ void BL_ConvertSensors(struct Object* blenderobject,
|
||||
gamesensor->Release();
|
||||
|
||||
}
|
||||
else if (gamesensor)
|
||||
gamesensor->Release();
|
||||
|
||||
sens=sens->next;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user