Return NULL from wxAuiNotebook::GetCurrentPage() if there is no selection.
Make it behave as wxBookCtrlBase::GetCurrentPage() and just silently return NULL instead of asserting if there is no selection. Closes #13932. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70525 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -4500,7 +4500,9 @@ bool wxAuiNotebook::SetPageImage(size_t n, int imageId)
|
||||
|
||||
wxWindow* wxAuiNotebook::GetCurrentPage () const
|
||||
{
|
||||
return GetPage(GetSelection());
|
||||
const int sel = GetSelection();
|
||||
|
||||
return sel == wxNOT_FOUND ? NULL : GetPage(sel);
|
||||
}
|
||||
|
||||
int wxAuiNotebook::ChangeSelection(size_t n)
|
||||
|
Reference in New Issue
Block a user