From 9aeb0085f887dc244af239ea7a52e6d42349ed9c Mon Sep 17 00:00:00 2001 From: rts Date: Wed, 31 Jul 2024 10:39:33 -0700 Subject: [PATCH] Prevent std::normal_distribution being called with sigma=0.0 #1485 --- src/include/stir/DetectorCoordinateMap.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/include/stir/DetectorCoordinateMap.h b/src/include/stir/DetectorCoordinateMap.h index 5e427a40c..1278abc1c 100644 --- a/src/include/stir/DetectorCoordinateMap.h +++ b/src/include/stir/DetectorCoordinateMap.h @@ -123,6 +123,8 @@ class DetectorCoordinateMap explicit DetectorCoordinateMap(double sigma = 0.0) : sigma(sigma) { + if (sigma == 0.0) + return; # ifdef STIR_OPENMP generators.resize(omp_get_max_threads()); distributions.resize(omp_get_max_threads());