diff options
Diffstat (limited to 'desktop-widgets/tab-widgets/maintab.cpp')
-rw-r--r-- | desktop-widgets/tab-widgets/maintab.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp index a2ff15368..98b8904c2 100644 --- a/desktop-widgets/tab-widgets/maintab.cpp +++ b/desktop-widgets/tab-widgets/maintab.cpp @@ -410,11 +410,8 @@ void MainTab::updateDiveInfo(bool clear) ui.location->setCurrentDiveSite(ds); ui.locationTags->setText(constructLocationTags(&ds->taxonomy, true)); - if (ui.locationTags->text().isEmpty() && has_location(&ds->location)) { - char *coords = printGPSCoords(&ds->location); - ui.locationTags->setText(coords); - free(coords); - } + if (ui.locationTags->text().isEmpty() && has_location(&ds->location)) + ui.locationTags->setText(printGPSCoords(&ds->location)); } else { ui.location->clear(); ui.locationTags->clear(); |