diff options
author | Thomas Hartmann <Thomas.Hartmann@digia.com> | 2014-01-14 17:20:17 +0100 |
---|---|---|
committer | Thomas Hartmann <Thomas.Hartmann@digia.com> | 2014-01-14 17:54:28 +0100 |
commit | 3ac3bcfadc170bfa2b14053d86e4a43348fd6019 (patch) | |
tree | bc4a43e78bcdcd8e891da596e90d0fe887d66226 /src | |
parent | bb0c02a0f931aaf5969d3762e866922a445fc226 (diff) |
QmlDesigner.PropertyEditor: Crash fix
There is no guarantee that the selection is still valid, when
changeExpression() is called. The signal might be triggered by an
EditingFinished() signal that was emitted after the selection was changed.
Just ignoring the change is not the ideal solution, but there is not much
more we can do.
Task-number: QTCREATORBUG-11249
Change-Id: I770dade680b0b8a052efd910b636829d1037e3ad
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp index 5ed4a00f28..27a1e84c61 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp @@ -240,6 +240,9 @@ void PropertyEditorView::changeExpression(const QString &propertyName) if (m_locked) return; + if (!m_selectedNode.isValid()) + return; + RewriterTransaction transaction = beginRewriterTransaction(); try { |