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
Notes:
blender-bot
2023-06-12 00:52:52 +02:00
Referenced by issue #39848, 'Reroute' from 'Layout' in compositor causes no output from viewer Referenced by issue #39803, Segmentation fault in ColorIO on startup Referenced by issue #39808, UV Map node not fully working
|
@ -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