mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-07 10:21:31 +00:00
SAGA2: Fix SensorList erase in addSensor
This commit is contained in:
parent
7e9dcc3bda
commit
9a386e0b72
@ -1929,8 +1929,8 @@ bool GameObject::addSensor(Sensor *newSensor) {
|
||||
assert((*it)->getObject() == this);
|
||||
|
||||
if (newSensor->thisID() == (*it)->thisID()) {
|
||||
sensorList->_list.remove(*it);
|
||||
delete *it;
|
||||
it = sensorList->_list.erase(it);
|
||||
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user