X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9e68ca10e951fb61e944c99c7774b1e415ae9f6d..0dc6f803fc980dade7792b7dfb4fa699073604d4:/src/xbt/heap.c diff --git a/src/xbt/heap.c b/src/xbt/heap.c index c795b76f8f..e035a3ab10 100644 --- a/src/xbt/heap.c +++ b/src/xbt/heap.c @@ -123,11 +123,11 @@ void *xbt_heap_pop(xbt_heap_t H) int size = H->size; void *max; - XBT_DEBUG("Heap has %d elements before extraction and max elem was %g",xbt_heap_size(H),xbt_heap_maxkey(H)); - if (H->count == 0) return NULL; + XBT_DEBUG("Heap has %d elements before extraction and max elem was %g",xbt_heap_size(H),xbt_heap_maxkey(H)); + max = CONTENT(H, 0); items[0] = items[(H->count) - 1];