0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-27 08:41:02 +08:00

Crash fix

This commit is contained in:
Victor Zarubkin 2016-10-02 17:45:55 +03:00 committed by Sergey Yagovtsev
parent 5de9fcf824
commit 19966b40c6

View File

@ -614,7 +614,7 @@ void EasyTreeWidget::onBlockStatusChangeClicked(bool _checked)
void EasyTreeWidget::onItemExpand(QTreeWidgetItem* _item)
{
if (!EASY_GLOBALS.bind_scene_and_tree_expand_status)
if (!EASY_GLOBALS.bind_scene_and_tree_expand_status || _item->parent() == nullptr)
{
resizeColumnsToContents();
return;
@ -631,7 +631,7 @@ void EasyTreeWidget::onItemExpand(QTreeWidgetItem* _item)
void EasyTreeWidget::onItemCollapse(QTreeWidgetItem* _item)
{
if (!EASY_GLOBALS.bind_scene_and_tree_expand_status)
if (!EASY_GLOBALS.bind_scene_and_tree_expand_status || _item->parent() == nullptr)
return;
static_cast<EasyTreeWidgetItem*>(_item)->guiBlock().expanded = false;