mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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
1 changed files with 4 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue