don't call EnsureVisible(tree->GetRootItem()) for a tree with hidden root, this crashes under MSW

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40855 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-08-26 22:21:11 +00:00
parent 1481968400
commit 23c2b62bb4

View File

@@ -578,7 +578,9 @@ void WidgetsFrame::InitBook()
// but ensure that the top of the tree is shown nevertheless
wxTreeCtrl * const tree = m_book->GetTreeCtrl();
tree->EnsureVisible(tree->GetRootItem());
wxTreeItemIdValue cookie;
tree->EnsureVisible(tree->GetFirstChild(tree->GetRootItem(), cookie));
#endif // USE_TREEBOOK
}