diff --git a/src/vt/collective/collective_ops.cc b/src/vt/collective/collective_ops.cc index b69d7d1122..022b457de8 100644 --- a/src/vt/collective/collective_ops.cc +++ b/src/vt/collective/collective_ops.cc @@ -293,8 +293,10 @@ void CollectiveAnyOps::abort( auto myrt = tls_rt ? tls_rt : ::vt::rt; if (myrt) { #if vt_check_enabled(trace_enabled) - //--- Try to flush most of the traces before aborting - myrt->theTrace->cleanupTracesFile(); + if (myrt->theTrace) { + //--- Try to flush most of the traces before aborting + myrt->theTrace->cleanupTracesFile(); + } #endif myrt->abort(str, code); } else if (vt::debug::preConfig()->vt_throw_on_abort) {