Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix potential segfault happening when only -trace is provided to smpi
[simgrid.git] / src / surf / sg_platf.cpp
index c925a4c12a2a12625ce91fd58440efb5763e4f4d..c55dd85ea828f0cdb0ca1a38398e927f683a05e6 100644 (file)
@@ -117,7 +117,7 @@ void sg_platf_new_router(sg_platf_router_cbarg_t router)
     XBT_DEBUG("Having set router coordinates for '%s'",router->id);
   }
 
-  if (TRACE_is_enabled())
+  if (TRACE_is_enabled() && TRACE_needs_platform())
     sg_instr_new_router(router);
 }