X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fc0daf84009784af053fa265d8ad8e9e446388f4..491b5be8305968871bc289453ed088a70c3de044:/src/mac/notebmac.cpp diff --git a/src/mac/notebmac.cpp b/src/mac/notebmac.cpp index 9d0b2c4593..496c75fe5b 100644 --- a/src/mac/notebmac.cpp +++ b/src/mac/notebmac.cpp @@ -17,7 +17,7 @@ // headers // ---------------------------------------------------------------------------- #ifdef __GNUG__ -#pragma implementation "notebook.h" + #pragma implementation "notebook.h" #endif #include @@ -149,7 +149,8 @@ void wxNotebook::SetPageSize(const wxSize& size) int wxNotebook::SetSelection(int nPage) { - wxASSERT( IS_VALID_PAGE(nPage) ); + if( !IS_VALID_PAGE(nPage) ) + return m_nSelection ; ChangePage(m_nSelection, nPage); SetControlValue( m_macControl , m_nSelection + 1 ) ; @@ -202,7 +203,7 @@ wxNotebookPage* wxNotebook::DoRemovePage(int nPage) { wxCHECK( IS_VALID_PAGE(nPage), NULL ); wxNotebookPage* page = m_pages[nPage] ; - m_pages.Remove(nPage); + m_pages.RemoveAt(nPage); MacSetupTabs();