Fixed possible crash in the outline view when processing incomplete documents.

Task-number: QTCREATORBUG-1948
This commit is contained in:
Roberto Raggi
2010-08-02 15:57:42 +02:00
parent bd3bff0b34
commit bf877d0aae

View File

@@ -401,6 +401,7 @@ QModelIndex QmlOutlineModel::enterPublicMember(AST::UiPublicMember *publicMember
{ {
QmlOutlineItem prototype(this); QmlOutlineItem prototype(this);
if (publicMember->name)
prototype.setText(publicMember->name->asString()); prototype.setText(publicMember->name->asString());
prototype.setIcon(m_icons->publicMemberIcon()); prototype.setIcon(m_icons->publicMemberIcon());
prototype.setData(PropertyType, ItemTypeRole); prototype.setData(PropertyType, ItemTypeRole);