diff options
author | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2003-07-31 17:37:36 +0000 |
---|---|---|
committer | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2003-07-31 17:37:36 +0000 |
commit | cb19d5b52db5530a949aeeae09dbcf6f2f081c51 (patch) | |
tree | fd965c0060fba1232a65f7fced6339e3d8a4a8ee /src | |
parent | 4cdea23215684e816418bf7499933d3844ede43c (diff) |
do nothing gracefully if N_horizons is set to 0
(previously we core-dumped -- thanks to Ian Hawke for spotting this!)
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@1171 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src')
-rw-r--r-- | src/driver/setup.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/driver/setup.cc b/src/driver/setup.cc index 1e4cc9e..dfd0d5e 100644 --- a/src/driver/setup.cc +++ b/src/driver/setup.cc @@ -345,12 +345,13 @@ state.N_active_procs // horizon numbers run from 1 to N_horizons inclusive // so the array size is N_horizons+1 state.AH_data_array = (N_horizons == 0) ? NULL : new AH_data*[N_horizons+1]; - { - for (int hn = 0 ; hn <= N_horizons ; ++hn) - { - state.AH_data_array[hn] = NULL; +if (N_horizons > 0) + then { + for (int hn = 0 ; hn <= N_horizons ; ++hn) + { + state.AH_data_array[hn] = NULL; + } } - } // |