Address pull request comments (nullptr checks and additional comments, mostly.)

This commit is contained in:
Lukas Brübach 2024-11-15 15:39:51 +01:00
parent 7f48d4e676
commit e70533a9bc
2 changed files with 57 additions and 57 deletions

View file

@ -160,8 +160,10 @@ AbstractDecklistNode *InnerDecklistNode::findChild(const QString &_name)
AbstractDecklistNode *InnerDecklistNode::findCardChildByNameAndUUID(const QString &_name, const QString &_uuid)
{
for (int i = 0; i < size(); i++) {
if (at(i)->getName() == _name && at(i)->getCardUuid() == _uuid) {
return at(i);
if (at(i) != nullptr) {
if (at(i)->getName() == _name && at(i)->getCardUuid() == _uuid) {
return at(i);
}
}
}
return nullptr;