Calling Expand with TVE_COLLAPSE | TVE_COLLAPSERESET which removes all child items and results in infoPtr->firstVisible being NULL. However TREEVIEW_ComputeItemRect requires that firstVisible to be valid.
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/comctl32/treeview.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index 3c73964304..8babdf8d69 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -3391,7 +3391,8 @@ TREEVIEW_Collapse(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item, } }
- TREEVIEW_RecalculateVisibleOrder(infoPtr, item); + if(!bRemoveChildren) + TREEVIEW_RecalculateVisibleOrder(infoPtr, item);
if (nextItem) scrollDist = -(scrollDist - nextItem->rect.top);
Is it possible to test this?