QmlProfiler: Don't connect() null pointers

Change-Id: Id97a5f2231608ae14d7122f168808b2e0264815b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Ulf Hermann
2016-05-30 16:27:46 +02:00
parent b034481c55
commit c472241ad1

View File

@@ -58,7 +58,8 @@ void FlameGraph::setModel(QAbstractItemModel *model)
disconnect(m_model, &QAbstractItemModel::modelReset, this, &FlameGraph::rebuild);
m_model = model;
connect(m_model, &QAbstractItemModel::modelReset, this, &FlameGraph::rebuild);
if (m_model)
connect(m_model, &QAbstractItemModel::modelReset, this, &FlameGraph::rebuild);
emit modelChanged(model);
rebuild();
}