From 62cbfc332542b09dc4d7d82f7b1ee61bdde6d800 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 13 Aug 2019 00:00:35 +0200 Subject: DiveObjectHelper: warn if object is generated from the null pointer Signed-off-by: Berthold Stoeger --- core/subsurface-qt/DiveObjectHelper.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core') diff --git a/core/subsurface-qt/DiveObjectHelper.cpp b/core/subsurface-qt/DiveObjectHelper.cpp index 3855cef11..6d625473e 100644 --- a/core/subsurface-qt/DiveObjectHelper.cpp +++ b/core/subsurface-qt/DiveObjectHelper.cpp @@ -58,6 +58,8 @@ static QString getPressures(struct dive *dive, int i, enum returnPressureSelecto DiveObjectHelper::DiveObjectHelper(struct dive *d) : m_dive(d) { + if (!m_dive) + qWarning("Creating DiveObjectHelper from NULL dive"); m_cyls.clear(); for (int i = 0; i < MAX_CYLINDERS; i++) { //Don't add blank cylinders, only those that have been defined. -- cgit v1.2.3-70-g09d2