]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied patch [ 774886 ] wxnotebook bug
authorJulian Smart <julian@anthemion.co.uk>
Tue, 22 Jul 2003 16:47:33 +0000 (16:47 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 22 Jul 2003 16:47:33 +0000 (16:47 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22240 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/notebook.cpp

index 1fe45847f054b1d6518f7e73531dd917985aaeea..a69381be92bd3e452da728d6ec0df1bc1aa0b415 100644 (file)
@@ -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 )