From: Marion Guthmuller Date: Thu, 3 Jul 2014 08:07:29 +0000 (+0200) Subject: model-checker : check dict content before removing value X-Git-Tag: v3_12~931 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/d931565ec0e75e437e26cd5b12f8bcf2bbd20445?ds=sidebyside model-checker : check dict content before removing value --- diff --git a/src/mc/mc_global.c b/src/mc/mc_global.c index 1ae1229903..21c7e36b21 100644 --- a/src/mc/mc_global.c +++ b/src/mc/mc_global.c @@ -576,7 +576,8 @@ void MC_replay(xbt_fifo_t stack, int start) if (mc_reduce_kind == e_mc_reduce_dpor) { MC_SET_MC_HEAP; char *key = bprintf("%lu", saved_req->issuer->pid); - xbt_dict_remove(first_enabled_state, key); + if(xbt_dict_get_or_null(first_enabled_state, key)) + xbt_dict_remove(first_enabled_state, key); xbt_free(key); MC_SET_STD_HEAP; }