From a7f72b988b2036892f7219b90f5b094c8b9c2092 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 15 Jan 2014 19:17:29 +0100 Subject: free dialog windows on tracking stoppage This is necessary to make tracker dialogs non-modal, as otherwise invalid casts occur. --- facetracknoir/facetracknoir.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/facetracknoir/facetracknoir.cpp b/facetracknoir/facetracknoir.cpp index c7ef4c13..640672a4 100644 --- a/facetracknoir/facetracknoir.cpp +++ b/facetracknoir/facetracknoir.cpp @@ -409,12 +409,20 @@ void FaceTrackNoIR::stopTracker( ) { if (pTrackerDialog) { pTrackerDialog->unRegisterTracker(); + delete pTrackerDialog; + pTrackerDialog = nullptr; } if (pProtocolDialog) { pProtocolDialog->unRegisterProtocol(); + delete pProtocolDialog; + pProtocolDialog = nullptr; } if (pFilterDialog) + { pFilterDialog->unregisterFilter(); + delete pFilterDialog; + pFilterDialog = nullptr; + } if ( tracker ) { delete tracker; -- cgit v1.2.3