diff --git a/contrib/src/gizmos/splittree.cpp b/contrib/src/gizmos/splittree.cpp index 9dce1f306e..346659cf30 100644 --- a/contrib/src/gizmos/splittree.cpp +++ b/contrib/src/gizmos/splittree.cpp @@ -282,7 +282,7 @@ void wxRemotelyScrolledTreeCtrl::OnPaint(wxPaintEvent& event) lastH = h; } } - if (GetBoundingRect(lastH, itemRect)) + if (lastH.IsOk() && GetBoundingRect(lastH, itemRect)) { cy = itemRect.GetBottom(); dc.DrawLine(0, cy, clientSize.x, cy);