X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/28b7f1f95510fe2efa30fc2fb4b4d27826da931e..1e129b9677a4073030b6533743c3a84056275548:/src/xbt/swag.c diff --git a/src/xbt/swag.c b/src/xbt/swag.c index 42ae4ef19b..dc09977550 100644 --- a/src/xbt/swag.c +++ b/src/xbt/swag.c @@ -59,6 +59,10 @@ void *xbt_swag_extract(void *obj, xbt_swag_t swag) if (!obj) return NULL; + if(!xbt_swag_belongs(obj, swag)) /* Trying to remove an object that + was not in this swag */ + return NULL; + if (swag->head == swag->tail) { /* special case */ if (swag->head != obj) /* Trying to remove an object that was not in this swag */ return NULL;