From e299a7e4d3f75355c263a3ccaa8dd4833dc5d919 Mon Sep 17 00:00:00 2001 From: Cedric Roux <cedric.roux@eurecom.fr> Date: Wed, 4 May 2016 16:04:16 +0200 Subject: [PATCH] bugfix - it may be that the container has only one child when we delete it --- common/utils/T/tracer/gui/container.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/utils/T/tracer/gui/container.c b/common/utils/T/tracer/gui/container.c index 3ec408ecd7..344f864382 100644 --- a/common/utils/T/tracer/gui/container.c +++ b/common/utils/T/tracer/gui/container.c @@ -49,7 +49,7 @@ static void del_child(gui *g, widget *_this, widget *child) (this->nchildren - position - 1) * sizeof(int)); this->growable = realloc(this->growable, (this->nchildren-1)*sizeof(int)); - if (this->growable == NULL) abort(); + if (this->nchildren != 1 && this->growable == NULL) abort(); this->nchildren--; } -- GitLab