Skip to content

Commit

Permalink
Prevent std::normal_distribution being called with sigma=0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
robbietuk committed Jul 31, 2024
1 parent 8c57bc9 commit 9aeb008
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/include/stir/DetectorCoordinateMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 9aeb008

Please sign in to comment.