diff --git a/src/rt/RcontribSimulManager.cpp b/src/rt/RcontribSimulManager.cpp index c09c978e..5cc5daed 100644 --- a/src/rt/RcontribSimulManager.cpp +++ b/src/rt/RcontribSimulManager.cpp @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: RcontribSimulManager.cpp,v 2.4 2024/11/01 16:17:33 greg Exp $"; +static const char RCSid[] = "$Id: RcontribSimulManager.cpp,v 2.5 2024/11/01 23:05:01 greg Exp $"; #endif /* * RcontribSimulManager.cpp @@ -148,7 +148,7 @@ RcontribSimulManager::RctCall(RAY *r, void *cd) int bi = 0; // get bin index if (mp->binv) { - worldfunc(RCCONTEXT, r); // compute bin # + worldfunc(RCCONTEXT, r); set_eparams(mp->params); double bval = evalue(mp->binv); if (bval <= -.5) @@ -324,6 +324,10 @@ RcontribSimulManager::PrepOutput() error(INTERNAL, "PrepOutput() called before octree & modifiers assigned"); return -1; } + if (!cdsF) { + error(INTERNAL, "missing RdataShare constructor call (*cdsF)"); + return -1; + } if (lu_doall(&modLUT, checkModExists, NULL) < 0) return -1; diff --git a/src/rt/RcontribSimulManager.h b/src/rt/RcontribSimulManager.h index 9c030807..6a9a54a8 100644 --- a/src/rt/RcontribSimulManager.h +++ b/src/rt/RcontribSimulManager.h @@ -1,4 +1,4 @@ -/* RCSid $Id: RcontribSimulManager.h,v 2.3 2024/10/30 01:38:21 greg Exp $ */ +/* RCSid $Id: RcontribSimulManager.h,v 2.4 2024/11/01 23:05:01 greg Exp $ */ /* * RcontribSimulManager.h * @@ -279,7 +279,7 @@ class RcontribSimulManager : protected RtraceSimulManager { int PrepOutput(); /// Are we ready to compute some records? bool Ready() const { - return rowsDone.Length(); + return (rowsDone.Length() > 0) & (accum > 0); } /// Set number of computation threads (0 => #cores) int SetThreadCount(int nt = 0);