]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/treebkg.cpp
Hacks for wine.
[wxWidgets.git] / src / generic / treebkg.cpp
index 87280396482e2c8f989763485732f8533a5f5f41..066e30edff811ca40a892174e822397dce6e541a 100644 (file)
@@ -651,7 +651,8 @@ int wxTreebook::DoSetSelection(size_t pagePos)
     else // page change vetoed
     {
         // tree selection might have already had changed
-        tree->SelectItem(DoInternalGetPage(oldSel));
+        if ( oldSel != wxNOT_FOUND )
+            tree->SelectItem(DoInternalGetPage(oldSel));
     }
 
     return oldSel;