mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
cleanup: Fix a Coverity warning
Two pointers were checked against NULL and then both were dereferenced if at least one was not NULL. Of course, this should have been an and, not an or expression. That said, this is a semi-false positive, since both pointers are set in the constructor and therefore never can be NULL. In principle, one could remove the whole check. Of course, realizing that would require a global analysis by Coverity, which I reckon it doesn't do. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
ab8533eeaa
commit
06d7ba082e
1 changed files with 1 additions and 1 deletions
|
@ -328,7 +328,7 @@ void FilterConstraintWidget::update()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the unit strings in case the locale was changed
|
// Update the unit strings in case the locale was changed
|
||||||
if (unitFrom || unitTo) {
|
if (unitFrom && unitTo) {
|
||||||
QString unitString = idx.data(FilterConstraintModel::UNIT_ROLE).value<QString>();
|
QString unitString = idx.data(FilterConstraintModel::UNIT_ROLE).value<QString>();
|
||||||
unitFrom->setText(unitString);
|
unitFrom->setText(unitString);
|
||||||
unitTo->setText(unitString);
|
unitTo->setText(unitString);
|
||||||
|
|
Loading…
Reference in a new issue