Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Move check at another place where it doesn't break the log machinery.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Fri, 23 Nov 2012 08:34:07 +0000 (09:34 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Fri, 23 Nov 2012 08:34:07 +0000 (09:34 +0100)
src/simix/smx_private.h

index 9cbceaa..257ea0e 100644 (file)
@@ -258,7 +258,8 @@ static XBT_INLINE smx_context_t SIMIX_context_new(xbt_main_func_t code,
                                                   void_pfn_smxprocess_t cleanup_func,
                                                   smx_process_t simix_process)
 {
-
+  if (!simix_global)
+    xbt_die("simix is not initialized, please call MSG_init first");
   return simix_global->context_factory->create_context(code,
                                                        argc, argv,
                                                        cleanup_func,
@@ -312,8 +313,6 @@ static XBT_INLINE smx_context_t SIMIX_context_self(void)
   if (simix_global && simix_global->context_factory) {
     return simix_global->context_factory->self();
   }
-
-  xbt_die("simix is not initialized, please call MSG_init first");
   return NULL;
 }