diff options
Diffstat (limited to 'Carpet/Carpet/src/Timers.cc')
-rw-r--r-- | Carpet/Carpet/src/Timers.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Carpet/Carpet/src/Timers.cc b/Carpet/Carpet/src/Timers.cc index 01d502aa3..f783c92de 100644 --- a/Carpet/Carpet/src/Timers.cc +++ b/Carpet/Carpet/src/Timers.cc @@ -59,6 +59,7 @@ namespace Carpet { void Timer::start () { TimerNode *current_timer = d_tree->current; + if (not d_tree->root) return; // do nothing if there is no root assert(current_timer); current_timer->getChildTimer(name())->start(); } @@ -67,6 +68,7 @@ namespace Carpet { void Timer::stop () { TimerNode *current = d_tree->current; + if (not d_tree->root) return; // do nothing if there is no root if (current->getName() != name()) CCTK_VWarn (0, __LINE__, __FILE__, CCTK_THORNSTRING, "Trying to stop enclosing timer '%s' before enclosed time '%s'", |