Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been assigned something valid by comparing to nullptr.
This commit is contained in:
@ -193,7 +193,7 @@ typedef PhysicsServer3D::MotionCollision PhysicsServer3DExtensionMotionCollision
|
||||
typedef PhysicsServer3D::MotionResult PhysicsServer3DExtensionMotionResult;
|
||||
|
||||
struct PhysicsServer3DExtensionStateCallback {
|
||||
void *instance;
|
||||
void *instance = nullptr;
|
||||
void (*callback)(void *p_instance, PhysicsDirectBodyState3D *p_state);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user