Don't crash trying to record zero dives
If the user clicks "Accept" when no dives were downloaded we would otherwise dereference unitialized memory. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
282698e5d2
commit
f4f42a0b97
@ -163,6 +163,10 @@ void DiveImportedModel::repopulate()
|
||||
|
||||
void DiveImportedModel::recordDives()
|
||||
{
|
||||
if (diveTable->nr == 0)
|
||||
// nothing to do, just exit
|
||||
return;
|
||||
|
||||
// walk the table of imported dives and record the ones that the user picked
|
||||
// clearing out the table as we go
|
||||
for (int i = 0; i < rowCount(); i++) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user