Check for failure in allocations.

This commit is contained in:
Hisham
2016-02-02 15:53:02 +01:00
parent a1f7f2869e
commit b54d2dde40
42 changed files with 141 additions and 134 deletions

View File

@ -155,7 +155,7 @@ void ColumnsPanel_update(Panel* super) {
ColumnsPanel* this = (ColumnsPanel*) super;
int size = Panel_size(super);
this->settings->changed = true;
this->settings->fields = realloc(this->settings->fields, sizeof(ProcessField) * (size+1));
this->settings->fields = xRealloc(this->settings->fields, sizeof(ProcessField) * (size+1));
this->settings->flags = 0;
for (int i = 0; i < size; i++) {
int key = ((ListItem*) Panel_get(super, i))->key;