DiveObjectHelper: warn if object is generated from the null pointer

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2019-08-13 00:00:35 +02:00 committed by Dirk Hohndel
parent 88119b356d
commit 62cbfc3325

View file

@ -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.