mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
profile: clear the chart when there is nothing to display
This is a shouldn't happen situation, because we always fake a profile. Let's handle it gracefully anyway. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
ecd3334a1c
commit
de71435c11
1 changed files with 3 additions and 1 deletions
|
@ -418,8 +418,10 @@ void ProfileScene::plotDive(const struct dive *dIn, int dcIn, DivePlannerPointsM
|
|||
}
|
||||
|
||||
const struct divecomputer *currentdc = get_dive_dc_const(d, dc);
|
||||
if (!currentdc || !currentdc->samples)
|
||||
if (!currentdc || !currentdc->samples) {
|
||||
clear();
|
||||
return;
|
||||
}
|
||||
|
||||
int animSpeed = instant || printMode ? 0 : qPrefDisplay::animation_speed();
|
||||
|
||||
|
|
Loading…
Reference in a new issue