Skip to content

Commit

Permalink
Merge pull request #1679 from zenustech/zeno2-fixbug
Browse files Browse the repository at this point in the history
[fix] judge nullptr
  • Loading branch information
zhouhang95 authored Dec 29, 2023
2 parents 8f7f697 + 11bc7b8 commit d5ad14b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions ui/zenomodel/src/graphsmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1701,11 +1701,13 @@ void GraphsModel::_markNodeChanged(const QModelIndex& nodeIdx)
if (sockProp & SOCKPROP_DICTLIST_PANEL)
{
QAbstractItemModel* pKeyObjModel = QVariantPtr<QAbstractItemModel>::asPtr(sock.data(ROLE_VPARAM_LINK_MODEL));
for (int _r = 0; _r < pKeyObjModel->rowCount(); _r++)
{
const QModelIndex& keyIdx = pKeyObjModel->index(_r, 0);
ZASSERT_EXIT(keyIdx.isValid());
socketLst << keyIdx;
if (pKeyObjModel) {
for (int _r = 0; _r < pKeyObjModel->rowCount(); _r++)
{
const QModelIndex& keyIdx = pKeyObjModel->index(_r, 0);
ZASSERT_EXIT(keyIdx.isValid());
socketLst << keyIdx;
}
}
}
else
Expand Down

0 comments on commit d5ad14b

Please sign in to comment.