From bb846584092e52f64fd9a329779d426640af3b77 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Mon, 20 Nov 2017 15:48:18 +0100 Subject: [PATCH 1/1] Correctly increment xbt_initialized. --- src/xbt/xbt_main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xbt/xbt_main.cpp b/src/xbt/xbt_main.cpp index 92a311b0c2..905c577f60 100644 --- a/src/xbt/xbt_main.cpp +++ b/src/xbt/xbt_main.cpp @@ -124,8 +124,8 @@ void xbt_init(int *argc, char **argv) { simgrid::xbt::installExceptionHandler(); - if (xbt_initialized) { - xbt_initialized++; + xbt_initialized++; + if (xbt_initialized > 1) { XBT_DEBUG("XBT has been initialized %d times.", xbt_initialized); return; } -- 2.20.1