Home » U++ Library support » TabCtrl » TabCtrl raises Assert in Array [BUG]
TabCtrl raises Assert in Array [BUG] [message #6259] |
Sun, 05 November 2006 00:41 ![Go to next message Go to next message](theme/default/images/down.png) |
fallingdutch
Messages: 258 Registered: July 2006
|
Experienced Member |
|
|
the following code of Accept in TabCtrl assumes that a Tab is present, but what if no tab was added to the TabCtrl?
bool TabCtrl::Accept() {
int ii=Get(); //ii is -1 if no Tab is present
if(accept_current)
return !tab[ii].slave || tab[ii].slave->Accept(); //-1 in Array raises Assertion
for(int i=0;i<tab.GetCount();i++) {
//in here no Problems at all
}
Set(ii); //-1 will make troubles here, too
return true;
}
so what about adding these lines before everything:
if(!tab.GetCount())
return true;
Bas
|
|
|
|
|
Goto Forum:
Current Time: Sun Sep 01 07:24:21 CEST 2024
Total time taken to generate the page: 0.00523 seconds
|