From 24dcc45f5b193918938c47829b4a177dbe3a5e36 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Fri, 24 Jul 2015 10:45:11 +0200 Subject: [PATCH] receiver crash solved --- slsDetectorSoftware/slsDetector/slsDetectorUtils.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/slsDetectorSoftware/slsDetector/slsDetectorUtils.cpp b/slsDetectorSoftware/slsDetector/slsDetectorUtils.cpp index 75f58e648..ba271d26b 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorUtils.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetectorUtils.cpp @@ -467,8 +467,11 @@ void slsDetectorUtils::acquire(int delflag){ pthread_mutex_unlock(&mg); - if (measurement_finished) - measurement_finished(im,*fileIndex,measFinished_p); + if (measurement_finished){ + pthread_mutex_lock(&mg); + measurement_finished(im,*fileIndex,measFinished_p); + pthread_mutex_unlock(&mg); + } if (*stoppedFlag) { break;