1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-29 01:42:32 +01:00

Fixed splitviews regarding index access (first element was never accesible)

This commit is contained in:
dan
2001-03-08 00:49:21 +00:00
parent 012d995ab1
commit 607bbb7e3a

View File

@@ -762,7 +762,7 @@ WMGetSplitViewSubviewAt(WMSplitView *sPtr, int index)
{
CHECK_CLASS(sPtr, WC_SplitView);
if (index > 0 && index < _GetSubviewsCount())
if (index >= 0 && index < _GetSubviewsCount())
return (_GetSubviewAt(index));
else
return (NULL);
@@ -798,7 +798,7 @@ WMRemoveSplitViewSubviewAt(WMSplitView *sPtr, int index)
CHECK_CLASS(sPtr, WC_SplitView);
if (index > 0 && index < _GetSubviewsCount()) {
if (index >= 0 && index < _GetSubviewsCount()) {
p = _GetPSubviewStructAt(index);
wfree(p);
WMDeleteFromBag(sPtr->subviewsBag, index);