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 |
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: Sat May 11 17:54:17 CEST 2024
Total time taken to generate the page: 0.02761 seconds
|