From c903880d196fb891f431e0b54ddd6663a7bec29f Mon Sep 17 00:00:00 2001 From: Vitesh Shah Date: Mon, 4 Jun 2018 12:36:52 +0200 Subject: [PATCH] using on unitialized error caused segfault in some cases --- src/math.f90 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/math.f90 b/src/math.f90 index ea3754869..4b8a00646 100644 --- a/src/math.f90 +++ b/src/math.f90 @@ -1820,6 +1820,8 @@ function math_sampleFiberOri(alpha,beta,FWHM) integer(pInt):: j,& !< index of smallest component i + allocate(a(0)) + allocate(idx(0)) fInC = [sin(alpha(1))*cos(alpha(2)), sin(alpha(1))*sin(alpha(2)), cos(alpha(1))] fInS = [sin(beta(1))*cos(beta(2)), sin(beta(1))*sin(beta(2)), cos(beta(1))]