Skip to content

Commit

Permalink
nullptr check
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Mar 14, 2024
1 parent 14ffdab commit 7b63279
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/checkother.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1591,7 +1591,7 @@ void CheckOther::checkConstPointer()
continue;
} else if (Token::simpleMatch(gparent, "[") && gparent->astOperand2() == parent)
continue;
else if (gparent->isCast() && gparent->valueType() &&
else if (gparent && gparent->isCast() && gparent->valueType() &&
((gparent->valueType()->pointer == 0 && gparent->valueType()->reference == Reference::None) ||
(var->valueType() && parent->valueType()->isConst(var->valueType()->pointer))))
continue;
Expand Down

0 comments on commit 7b63279

Please sign in to comment.