Skip to content

Commit

Permalink
[Fix] SRM detection crash from missing nullptr check
Browse files Browse the repository at this point in the history
  • Loading branch information
saif-el committed Mar 3, 2021
1 parent 389f48c commit 3fda620
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/libmaven/peakdetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -902,9 +902,11 @@ void PeakDetector::performMetaGrouping(bool applyGroupFilters,
continue;

bool notAdduct = group.adduct() == nullptr;
bool parentAdductAndNotIsotope = (group.adduct()->isParent()
bool parentAdductAndNotIsotope = (group.adduct() != nullptr
&& group.adduct()->isParent()
&& group.isotope().isNone());
bool parentAdductAndParentIsotope = (group.adduct()->isParent()
bool parentAdductAndParentIsotope = (group.adduct() != nullptr
&& group.adduct()->isParent()
&& group.isotope().isParent());
if (notAdduct
|| parentAdductAndNotIsotope
Expand Down

0 comments on commit 3fda620

Please sign in to comment.