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:
Vadim Zeitlin
2012-02-06 13:28:42 +00:00
parent 38d7fa2525
commit b98eb28a50

View File

@@ -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)