Commit 557f9c66 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Merge branch 'fix_segfault' into 'master'

Cluster: fix segfault if pixel charge negative

See merge request corryvreckan/corryvreckan!434
parents 355d4fa7 a6b4162d
Pipeline #2696317 passed with stages
in 31 minutes and 30 seconds
......@@ -51,7 +51,7 @@ std::vector<const Pixel*> Cluster::pixels() const {
const Pixel* Cluster::getSeedPixel() const {
Pixel* seed = nullptr;
double maxcharge = -1;
double maxcharge = std::numeric_limits<double>::lowest();
// loop overall pixels and find the one with the largest charge:
for(auto& px : m_pixels) {
auto pxl = dynamic_cast<Pixel*>(px.GetObject());
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment