Skip to content

Commit

Permalink
Merge pull request #1486 from robbietuk/FixSigma0Issue
Browse files Browse the repository at this point in the history
Prevent `std::normal_distribution` being called with `sigma=0.0`
  • Loading branch information
KrisThielemans authored Aug 6, 2024
2 parents 8c57bc9 + 9aeb008 commit ca5ad8f
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 ca5ad8f

Please sign in to comment.