diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-08-04 19:39:47 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-11-09 19:19:04 +0100 |
commit | fd23c3d9085a4cd288b95ea414f58f3ad1ac92f1 (patch) | |
tree | f16afda47369894055c68489f0c87efc6555af35 /profile-widget/tankitem.h | |
parent | 2d637f2528ec94710d6c6f7e15568073323c74c1 (diff) | |
download | subsurface-fd23c3d9085a4cd288b95ea414f58f3ad1ac92f1.tar.gz |
Profile: don't crash when there are no cylinders
TankItem would happily access a non-existing cylinder and crash.
But freedives for example have no cylinders. Thus, handle that
situation gracefully by exiting early if there is no cylinder.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'profile-widget/tankitem.h')
-rw-r--r-- | profile-widget/tankitem.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/profile-widget/tankitem.h b/profile-widget/tankitem.h index ff86f787d..73994444b 100644 --- a/profile-widget/tankitem.h +++ b/profile-widget/tankitem.h @@ -15,7 +15,6 @@ class TankItem : public QObject, public QGraphicsRectItem public: explicit TankItem(QObject *parent = 0); - ~TankItem(); void setHorizontalAxis(DiveCartesianAxis *horizontal); void setData(DivePlotDataModel *model, struct plot_info *plotInfo, struct dive *d); |