X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/edde8f7fbc1b74a81551bf9eb7bac1935b999296..9e68ca10e951fb61e944c99c7774b1e415ae9f6d:/src/xbt/backtrace_windows.c diff --git a/src/xbt/backtrace_windows.c b/src/xbt/backtrace_windows.c index 0b2167c838..0ad381d47c 100644 --- a/src/xbt/backtrace_windows.c +++ b/src/xbt/backtrace_windows.c @@ -179,16 +179,16 @@ void xbt_ex_setup_backtrace(xbt_ex_t * e) int i; char **backtrace_syms; - xbt_assert(e - && e->used, - "Backtrace not setup yet, cannot set it up for display"); + xbt_assert(e, "Backtrace not setup yet, cannot set it up for display"); + + if (!e->used) + return; backtrace_syms = backtrace_symbols(e->bt, e->used); e->bt_strings = NULL; /* parse the output and build a new backtrace */ e->bt_strings = xbt_new(char *, e->used); - for (i = 0; i < e->used; i++) e->bt_strings[i] = backtrace_syms[i];