From b79114c5d05a4f7c5ea387e90cd17243bb7ef7c5 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 1 Jan 2021 11:33:40 -0800 Subject: [PATCH] cleanup: ensure DiveFilter is consistent when created Otherwise we might access an uninitialized member. Signed-off-by: Dirk Hohndel --- core/divefilter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/divefilter.cpp b/core/divefilter.cpp index 87b5846f8..3ea69a0ba 100644 --- a/core/divefilter.cpp +++ b/core/divefilter.cpp @@ -114,7 +114,9 @@ DiveFilter *DiveFilter::instance() return &self; } -DiveFilter::DiveFilter() : diveSiteRefCount(0) +DiveFilter::DiveFilter() : + shown_dives(0), + diveSiteRefCount(0) { }