profile: clear dive pointer when clearing profile

Try to avoid stale pointers when resetting the dive data.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2022-10-30 09:06:00 +01:00 committed by Dirk Hohndel
parent e0e21cab3d
commit d3867af1b9

View file

@ -397,6 +397,8 @@ void ProfileWidget2::clear()
handles.clear();
gases.clear();
empty = true;
d = nullptr;
dc = 0;
}
void ProfileWidget2::setProfileState(const dive *dIn, int dcIn)