1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-23 11:47:24 +01:00

fixes #2261 Crash when expanding Standard Library

This commit is contained in:
Vadim Kurland 2011-03-22 15:36:49 -07:00
parent 5a83ec15ff
commit da317dd151

View File

@ -195,7 +195,9 @@ void ObjectManipulator::expandOrCollapseCurrentTreeNode(QTreeWidgetItem *item,
bool expand)
{
QTreeWidgetItem *parent = item->parent();
if (expand && ! parent->isExpanded()) parent->setExpanded(true);
if (expand && parent != NULL && ! parent->isExpanded())
parent->setExpanded(true);
item->setExpanded(expand);
for (int i=0; i<item->childCount(); ++i)
expandOrCollapseCurrentTreeNode(item->child(i), expand);