mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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:
parent
88119b356d
commit
62cbfc3325
1 changed files with 2 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue