mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-04 21:04:18 +01:00
Fixed splitviews regarding index access (first element was never accesible)
This commit is contained in:
@@ -762,7 +762,7 @@ WMGetSplitViewSubviewAt(WMSplitView *sPtr, int index)
|
|||||||
{
|
{
|
||||||
CHECK_CLASS(sPtr, WC_SplitView);
|
CHECK_CLASS(sPtr, WC_SplitView);
|
||||||
|
|
||||||
if (index > 0 && index < _GetSubviewsCount())
|
if (index >= 0 && index < _GetSubviewsCount())
|
||||||
return (_GetSubviewAt(index));
|
return (_GetSubviewAt(index));
|
||||||
else
|
else
|
||||||
return (NULL);
|
return (NULL);
|
||||||
@@ -798,7 +798,7 @@ WMRemoveSplitViewSubviewAt(WMSplitView *sPtr, int index)
|
|||||||
|
|
||||||
CHECK_CLASS(sPtr, WC_SplitView);
|
CHECK_CLASS(sPtr, WC_SplitView);
|
||||||
|
|
||||||
if (index > 0 && index < _GetSubviewsCount()) {
|
if (index >= 0 && index < _GetSubviewsCount()) {
|
||||||
p = _GetPSubviewStructAt(index);
|
p = _GetPSubviewStructAt(index);
|
||||||
wfree(p);
|
wfree(p);
|
||||||
WMDeleteFromBag(sPtr->subviewsBag, index);
|
WMDeleteFromBag(sPtr->subviewsBag, index);
|
||||||
|
|||||||
Reference in New Issue
Block a user