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
@ -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…
x
Reference in New Issue
Block a user