X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8c7fb508291f0bc58478ffaec0bcc8f648f01c8b..29c829ba84c29a33f5fac69de94513bc174e35c2:/src/aui/auibook.cpp diff --git a/src/aui/auibook.cpp b/src/aui/auibook.cpp index beebabff8a..f299944023 100644 --- a/src/aui/auibook.cpp +++ b/src/aui/auibook.cpp @@ -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)