1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-21 13:28:05 +01:00

Fixed wrealloc() to be consistent with the wmalloc() behaviour when it cannot

allocate memory.
This commit is contained in:
dan
1999-12-01 22:25:48 +00:00
parent c914639b8c
commit ef42fce3e6
4 changed files with 29 additions and 21 deletions

View File

@@ -146,10 +146,6 @@ WMInsertItemInTabView(WMTabView *tPtr, int index, WMTabViewItem *item)
items = wrealloc(tPtr->items,
sizeof(WMTabViewItem*) * (tPtr->maxItems + 10));
if (!items) {
wwarning("out of memory allocating memory for tabview");
return;
}
memset(&items[tPtr->maxItems], 0, sizeof(WMTabViewItem*) * 10);
tPtr->items = items;
tPtr->maxItems += 10;