mirror of
https://github.com/gryf/wmaker.git
synced 2026-10-09 11:12:29 +02:00
Fixed wrealloc() to be consistent with the wmalloc() behaviour when it cannot
allocate memory.
This commit is contained in:
1 parent
c914639b8c
commit
ef42fce3e6
4 files changed
+29
-21
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user