mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Fix easily reproduced crash
Open dive file. Click Location-manage. Pick a site. Click close. Click Location-manage again. BOOM. This seems to make sense, but since not a lot of the code is hooked up yet, I'm not sure this is what we want in the end. But for now it prevents an easily reproduced crash. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
10a0a252c8
commit
c11bbe4f38
1 changed files with 4 additions and 1 deletions
|
@ -73,7 +73,10 @@ LocationInformationWidget::LocationInformationWidget(QWidget *parent) : QGroupBo
|
|||
void LocationInformationWidget::setCurrentDiveSite(int dive_nr)
|
||||
{
|
||||
currentDs = get_dive_site(dive_nr);
|
||||
if (currentDs)
|
||||
setLocationId(currentDs->uuid);
|
||||
else
|
||||
setLocationId(displayed_dive.dive_site_uuid);
|
||||
}
|
||||
|
||||
void LocationInformationWidget::setLocationId(uint32_t uuid)
|
||||
|
|
Loading…
Reference in a new issue