delete the universe before removing the number from the map
This commit is contained in:
parent
84476d33c7
commit
32ef49554b
@ -45,7 +45,9 @@ void Receiver::subscribe(const uint16_t num) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Receiver::unsubscribe(const uint16_t num) {
|
void Receiver::unsubscribe(const uint16_t num) {
|
||||||
if (universes_.count(num))
|
if (!universes_.count(num))
|
||||||
|
return;
|
||||||
|
delete universes_.at(num);
|
||||||
universes_.erase(num);
|
universes_.erase(num);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user