1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

Fix some code found by Coverity Scan and PVS Studio

This commit is contained in:
qarmin
2019-07-23 09:14:31 +02:00
parent e466dc2daa
commit aab8da25ad
24 changed files with 71 additions and 65 deletions

View File

@@ -581,6 +581,10 @@ void SpaceBullet::create_empty_world(bool p_create_soft_world) {
} else {
world_mem = malloc(sizeof(btDiscreteDynamicsWorld));
}
if (!world_mem) {
ERR_EXPLAIN("Out of memory");
ERR_FAIL();
}
if (p_create_soft_world) {
collisionConfiguration = bulletnew(GodotSoftCollisionConfiguration(static_cast<btDiscreteDynamicsWorld *>(world_mem)));