forked from qt-creator/qt-creator
QmlProfiler: Don't connect() null pointers
Change-Id: Id97a5f2231608ae14d7122f168808b2e0264815b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user