Add check on perception and propulsion being null
This commit is contained in:
parent
ec1da8f81c
commit
4fcbcf80ad
@ -14,9 +14,11 @@ Roboid::Roboid() {
|
||||
|
||||
Roboid::Roboid(Perception *perception, Propulsion *propulsion) : Roboid() {
|
||||
this->perception = perception;
|
||||
perception->roboid = this;
|
||||
if (perception != nullptr)
|
||||
perception->roboid = this;
|
||||
this->propulsion = propulsion;
|
||||
propulsion->roboid = this;
|
||||
if (propulsion != nullptr)
|
||||
propulsion->roboid = this;
|
||||
}
|
||||
|
||||
Roboid::Roboid(ServoMotor **actuation) : actuation(actuation) {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user