wxNotebook::RemovePage leads to assertion
|Reported by:||Stegei||Owned by:||VZ|
When removing the last page on wxOSX/Cocoa of a wxNotebook, the function wxNotebook::DoRemovePage will call GetPeer()->SetValue with a value of 0. The implementation of SetValue(int value) will then call [slf selectTabViewItemAtIndex:(uint)-1]; which is invalid.
My solution is to simply avoid calling selectTabViewItemAtIndex if the value is 0.
Please check the attached patch for the fix.
Change History (6)
Changed 3 months ago by Stegei
comment:2 Changed 3 months ago by vadz
- Resolution changed from fixed to port to stable
- Status changed from closed to portneeded