mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
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:
parent
e0e21cab3d
commit
d3867af1b9
1 changed files with 2 additions and 0 deletions
|
@ -397,6 +397,8 @@ void ProfileWidget2::clear()
|
||||||
handles.clear();
|
handles.clear();
|
||||||
gases.clear();
|
gases.clear();
|
||||||
empty = true;
|
empty = true;
|
||||||
|
d = nullptr;
|
||||||
|
dc = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProfileWidget2::setProfileState(const dive *dIn, int dcIn)
|
void ProfileWidget2::setProfileState(const dive *dIn, int dcIn)
|
||||||
|
|
Loading…
Reference in a new issue