Fix crash when changing products

This commit is contained in:
Dan Paulat 2023-05-30 23:28:24 -05:00
parent 1b49e317e4
commit e80c4866a5
3 changed files with 17 additions and 5 deletions

View file

@ -108,7 +108,11 @@ Level2ProductView::Level2ProductView(
{
ConnectRadarProductManager();
}
Level2ProductView::~Level2ProductView() = default;
Level2ProductView::~Level2ProductView()
{
std::unique_lock sweepLock {sweep_mutex()};
}
void Level2ProductView::ConnectRadarProductManager()
{

View file

@ -50,7 +50,11 @@ Level3RadialView::Level3RadialView(
p(std::make_unique<Level3RadialViewImpl>())
{
}
Level3RadialView::~Level3RadialView() = default;
Level3RadialView::~Level3RadialView()
{
std::unique_lock sweepLock {sweep_mutex()};
}
float Level3RadialView::range() const
{
@ -150,8 +154,8 @@ void Level3RadialView::ComputeSweep()
return;
}
// A message with radial data should either have a Digital Radial Data Array
// Packet, or a Radial Data Array Packet (TODO)
// A message with radial data should either have a Digital Radial Data
// Array Packet, or a Radial Data Array Packet (TODO)
std::shared_ptr<wsr88d::rpg::DigitalRadialDataArrayPacket>
digitalDataPacket = nullptr;
std::shared_ptr<wsr88d::rpg::RadialDataPacket> radialDataPacket = nullptr;

View file

@ -50,7 +50,11 @@ Level3RasterView::Level3RasterView(
p(std::make_unique<Level3RasterViewImpl>())
{
}
Level3RasterView::~Level3RasterView() = default;
Level3RasterView::~Level3RasterView()
{
std::unique_lock sweepLock {sweep_mutex()};
}
float Level3RasterView::range() const
{