From c64cd459532410e3eb3e8fdbff5fab9e594bf8b1 Mon Sep 17 00:00:00 2001 From: AdenKoperczak Date: Tue, 8 Apr 2025 12:29:06 -0400 Subject: [PATCH] Disconnect cursor scale connection before anything overlay layer is destroid to avoid race conditions --- scwx-qt/source/scwx/qt/map/overlay_layer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scwx-qt/source/scwx/qt/map/overlay_layer.cpp b/scwx-qt/source/scwx/qt/map/overlay_layer.cpp index 90fcb2ed..36258e75 100644 --- a/scwx-qt/source/scwx/qt/map/overlay_layer.cpp +++ b/scwx-qt/source/scwx/qt/map/overlay_layer.cpp @@ -166,7 +166,10 @@ OverlayLayer::OverlayLayer(std::shared_ptr context) : p->activeBoxOuter_->SetPosition(0.0f, 0.0f); } -OverlayLayer::~OverlayLayer() = default; +OverlayLayer::~OverlayLayer() +{ + p->cursorScaleConnection_.disconnect(); +} void OverlayLayerImpl::SetCusorLocation(common::Coordinate coordinate) {