Avoid NULL dereference

Coverity CID 1325297

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-10-01 21:24:04 -04:00
parent 15a55b9648
commit a51903fbb6

View file

@ -565,7 +565,8 @@ void DiveLocationLineEdit::setCurrentDiveSiteUuid(uint32_t uuid)
struct dive_site *ds = get_dive_site_by_uuid(uuid);
if (!ds)
clear();
setText(ds->name);
else
setText(ds->name);
}
void DiveLocationLineEdit::showPopup()