Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Bugfix: I inverted the semantic of xbt_dict_get_or_null_ext and xbt_dict_get_ext...
[simgrid.git] / src / xbt / dict.c
index 4bd519b..f116e5a 100644 (file)
@@ -320,7 +320,7 @@ void *xbt_dict_get_ext(xbt_dict_t dict,
   }
 
   if (current == NULL)
-    return NULL;
+    THROW2(not_found_error, 0, "key %.*s not found", key_len, key);
 
   return current->content;
 }
@@ -341,7 +341,7 @@ void *xbt_dict_get_or_null_ext(xbt_dict_t dict,
   }
 
   if (current == NULL)
-    THROW2(not_found_error, 0, "key %.*s not found", key_len, key);
+    return NULL;
 
   return current->content;
 }