X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fc7a2a602b4bd9308be21bc07e40a680f483438e..a1a816f8ccbcdd119aa17bcdcd7094d6bf1ceee0:/src/msw/notebook.cpp diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index 1fe45847f0..a69381be92 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -424,7 +424,8 @@ wxNotebookPage *wxNotebook::DoRemovePage(int nPage) // for some unknown reason if the tab control shows the up-down // control (i.e. when there are too many pages) -- otherwise after // deleting a page nothing at all is shown - m_pages[m_nSelection]->Refresh(); + if (m_nSelection >= 0) + m_pages[m_nSelection]->Refresh(); } if ( selNew != -1 )