avoid assert in DoGetBestSize() for an empty tree
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -162,7 +162,9 @@ wxSize wxTreeCtrlBase::DoGetBestSize() const
|
||||
else // use precise, if potentially slow, size computation method
|
||||
{
|
||||
// iterate over all items recursively
|
||||
wxGetBestTreeSize(this, GetRootItem(), size);
|
||||
wxTreeItemId idRoot = GetRootItem();
|
||||
if ( idRoot.IsOk() )
|
||||
wxGetBestTreeSize(this, idRoot, size);
|
||||
}
|
||||
|
||||
// need some minimal size even for empty tree
|
||||
|
Reference in New Issue
Block a user