Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use plain pointers in internal structures, and hopefully fix more memory leaks.
[simgrid.git] / src / xbt / xbt_main.cpp
index d60ccb09de174f73a32fa5ce2c1b56daa41c0199..bfdf8696655ff7a9bbfcafff6b06dd91dabef510 100644 (file)
@@ -116,14 +116,14 @@ static void xbt_postexit()
 /** @brief Initialize the xbt mechanisms. */
 void xbt_init(int *argc, char **argv)
 {
-  simgrid::xbt::install_exception_handler();
-
   xbt_initialized++;
   if (xbt_initialized > 1) {
     XBT_DEBUG("XBT has been initialized %d times.", xbt_initialized);
     return;
   }
 
+  simgrid::xbt::install_exception_handler();
+
   xbt_binary_name = argv[0];
   xbt_cmdline     = xbt_dynar_new(sizeof(char*), NULL);
   for (int i = 0; i < *argc; i++)