Skip to content

Commit

Permalink
[fix] judge nullptr
Browse files Browse the repository at this point in the history
  • Loading branch information
legobadman committed Dec 29, 2023
1 parent b5ad4d0 commit 11bc7b8
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 @@ -1700,11 +1700,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 11bc7b8

Please sign in to comment.