delete the universe before removing the number from the map

This commit is contained in:
Kevin Matz 2021-06-22 21:25:40 -04:00
parent 84476d33c7
commit 32ef49554b

View File

@ -45,7 +45,9 @@ void Receiver::subscribe(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);
}