Skip to content

Commit

Permalink
Prevent null pointer dereference (#4827)
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Dyachenko authored and GitHub Enterprise committed Jul 17, 2024
1 parent 6a3c2b1 commit f868a74
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions groups/bsl/bsls/bsls_atomic.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3948,8 +3948,10 @@ int main(int argc, char *argv[])
}

LOOP_ASSERT(i, VAL == X);
LOOP_ASSERT(i, VAL == &(*X));
LOOP_ASSERT(i, VAL == X->self());
if (X) {
LOOP_ASSERT(i, VAL == &(*X));
LOOP_ASSERT(i, VAL == X->self());
}
}
}

Expand Down

0 comments on commit f868a74

Please sign in to comment.