mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +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()
|
void DivePlotDataModel::calculateDecompression()
|
||||||
{
|
{
|
||||||
struct dive *d = getDiveById(id());
|
struct dive *d = getDiveById(id());
|
||||||
|
if (!d)
|
||||||
|
return;
|
||||||
struct divecomputer *dc = select_dc(&d->dc);
|
struct divecomputer *dc = select_dc(&d->dc);
|
||||||
init_decompression(d);
|
init_decompression(d);
|
||||||
calculate_deco_information(d, dc, &pInfo, FALSE);
|
calculate_deco_information(d, dc, &pInfo, FALSE);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue