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
@ -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…
x
Reference in New Issue
Block a user