Commit a791ee41 authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner: crash fix

Task-number: QTCREATORBUG-6558
Change-Id: I5e5719c7764df350f4e466b8f1e90bdeed872b3d
Reviewed-by: default avatarEike Ziller <eike.ziller@nokia.com>
Reviewed-by: default avatarAlessandro Portale <alessandro.portale@nokia.com>
parent c344032b
......@@ -187,8 +187,8 @@ public:
bool renameId(const QString& oldId, const QString& newId);
const QmlJS::ScopeChain &scopeChain() const;
QmlJS::Document *document() const;
const QmlJS::ScopeChain *scopeChain() const;
QString convertTypeToImportAlias(const QString &type) const;
......
......@@ -490,8 +490,8 @@ const QmlJS::ObjectValue *NodeMetaInfoPrivate::getObjectValue() const
QmlJS::ContextPtr NodeMetaInfoPrivate::context() const
{
if (m_model && m_model->rewriterView()) {
return m_model->rewriterView()->scopeChain().context();
if (m_model && m_model->rewriterView() && m_model->rewriterView()->scopeChain()) {
return m_model->rewriterView()->scopeChain()->context();
}
return QmlJS::ContextPtr(0);
}
......
......@@ -624,7 +624,7 @@ bool RewriterView::renameId(const QString& oldId, const QString& newId)
return false;
}
const QmlJS::ScopeChain &RewriterView::scopeChain() const
const QmlJS::ScopeChain *RewriterView::scopeChain() const
{
return textToModelMerger()->scopeChain();
}
......
......@@ -68,8 +68,8 @@ public:
RewriterView *view() const
{ return m_rewriterView; }
const QmlJS::ScopeChain &scopeChain() const
{ return *m_scopeChain; }
const QmlJS::ScopeChain *scopeChain() const
{ return m_scopeChain.data(); }
QmlJS::Document *document() const
{ return m_document.data(); }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment