Skip to content

Commit

Permalink
bugfix: unregister interest when we're done with a device
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkae committed Jul 11, 2024
1 parent 8fdbce6 commit 922d817
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/server/input/default_input_device_hub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,11 @@ void mi::DefaultInputDeviceHub::remove_device(std::shared_ptr<InputDevice> const
BOOST_THROW_EXCEPTION(std::logic_error("Input device not managed by server"));
}

if (auto const observer = std::dynamic_pointer_cast<LedObserver>(device))
{
led_observer_registrar->unregister_interest(*observer, (*pos)->id());
}

devices.erase(pos, end(devices));
}

Expand Down

0 comments on commit 922d817

Please sign in to comment.