Skip to content

Commit c627eff

Browse files
committed
Fixed a crash when removing TreeView from Box
Signed-off-by: jiajia_deng <[email protected]>
1 parent a59b15c commit c627eff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tool_kits/duilib/Control/TreeView.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ void TreeView::RemoveAll()
248248
void TreeView::SetWindow(Window* pManager, Box* pParent, bool bInit)
249249
{
250250
ListBox::SetWindow(pManager, pParent, bInit);
251-
m_rootNode->SetWindow(pManager, pParent, bInit);
251+
if (NULL != pParent) m_rootNode->SetWindow(pManager, pParent, bInit);
252252
}
253253

254254
}

0 commit comments

Comments
 (0)