mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix crash when cancelling divesite edit with empty divesite
Only happens if you dont't have any divesites in your list, but either way, it could happen. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
636aac83f8
commit
8b96179d59
1 changed files with 1 additions and 2 deletions
|
@ -126,8 +126,7 @@ void LocationInformationWidget::acceptChanges()
|
|||
|
||||
void LocationInformationWidget::rejectChanges()
|
||||
{
|
||||
Q_ASSERT(currentDs != NULL);
|
||||
if (dive_site_is_empty(currentDs)) {
|
||||
if (currentDs && dive_site_is_empty(currentDs)) {
|
||||
delete_dive_site(currentDs->uuid);
|
||||
displayed_dive.dive_site_uuid = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue