diff --git a/contrib/src/gizmos/splittree.cpp b/contrib/src/gizmos/splittree.cpp index fbb3885081..a99b6733c8 100644 --- a/contrib/src/gizmos/splittree.cpp +++ b/contrib/src/gizmos/splittree.cpp @@ -427,7 +427,7 @@ void wxTreeCompanionWindow::OnPaint(wxPaintEvent& event) dc.DrawLine(0, cy, clientSize.x, cy); } } - if (m_treeCtrl->GetBoundingRect(lastH, itemRect)) + if (lastH.IsOk() && m_treeCtrl->GetBoundingRect(lastH, itemRect)) { cy = itemRect.GetBottom(); dc.DrawLine(0, cy, clientSize.x, cy);