From: degomme Date: Wed, 20 Jan 2016 17:09:48 +0000 (+0100) Subject: fix potential segfault happening when only -trace is provided to smpi X-Git-Tag: v3_13~1186 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/ab13ba1974c46c7b2458483bcd50dd6101df6e2a?ds=sidebyside fix potential segfault happening when only -trace is provided to smpi --- diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index c925a4c12a..c55dd85ea8 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -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); }