bugfix - it may be that the container has only one child when we delete it

This commit is contained in:
Cedric Roux
2016-05-04 16:04:16 +02:00
parent 8f50b77e30
commit e299a7e4d3
+1 -1
View File
@@ -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--;
}