diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-08-13 00:00:35 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-08-12 16:28:49 -0700 |
commit | 62cbfc332542b09dc4d7d82f7b1ee61bdde6d800 (patch) | |
tree | 5cd40e3022f7f6fc2bc4168d611ee02d944de4fd /core | |
parent | 88119b356df1dcb2f97064d213f439b636276544 (diff) | |
download | subsurface-62cbfc332542b09dc4d7d82f7b1ee61bdde6d800.tar.gz |
DiveObjectHelper: warn if object is generated from the null pointer
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core')
-rw-r--r-- | core/subsurface-qt/DiveObjectHelper.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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. |