aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/raweditor/RawEditorWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/raweditor/RawEditorWindow.cpp')
-rw-r--r--src/modules/raweditor/RawEditorWindow.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/raweditor/RawEditorWindow.cpp b/src/modules/raweditor/RawEditorWindow.cpp
index e3277673d..5bed0381e 100644
--- a/src/modules/raweditor/RawEditorWindow.cpp
+++ b/src/modules/raweditor/RawEditorWindow.cpp
@@ -268,7 +268,7 @@ void RawEditorWidget::removeCurrentHandler()
m_pEditor->setEnabled(false);
m_pNameEditor->setEnabled(false);
if(!parent->childCount())
- parent->setEnabled(false);
+ delete parent;
}
}
@@ -344,7 +344,7 @@ void RawEditorWidget::currentItemChanged(QTreeWidgetItem * it, QTreeWidgetItem *
{
KVI_ASSERT(m_bOneTimeSetupDone);
saveLastEditedItem();
- if(it->parent())
+ if(it && it->parent())
{
m_pLastEditedItem = (RawHandlerTreeWidgetItem *)it;
m_pNameEditor->setEnabled(true);
@@ -358,7 +358,7 @@ void RawEditorWidget::currentItemChanged(QTreeWidgetItem * it, QTreeWidgetItem *
m_pNameEditor->setEnabled(false);
m_pNameEditor->setText("");
m_pEditor->setEnabled(false);
- QString szTmp = QString(__tr2qs_ctx("\n\nRAW Event:\n%1", "editor")).arg(((RawHandlerTreeWidgetItem *)it)->text(0));
+ QString szTmp = it ? QString(__tr2qs_ctx("\n\nRAW Event:\n%1", "editor")).arg(((RawHandlerTreeWidgetItem *)it)->text(0)) : "";
m_pEditor->setText(szTmp);
}
}