mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 20:33:24 +00:00
Profile2: Prevent another crash if no dives are present
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
691fbabb7a
commit
4b21e2f9a3
1 changed files with 2 additions and 0 deletions
|
@ -147,6 +147,8 @@ void DivePlotDataModel::emitDataChanged()
|
|||
void DivePlotDataModel::calculateDecompression()
|
||||
{
|
||||
struct dive *d = getDiveById(id());
|
||||
if (!d)
|
||||
return;
|
||||
struct divecomputer *dc = select_dc(&d->dc);
|
||||
init_decompression(d);
|
||||
calculate_deco_information(d, dc, &pInfo, FALSE);
|
||||
|
|
Loading…
Add table
Reference in a new issue