diff options
-rw-r--r-- | qt-models/diveimportedmodel.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/qt-models/diveimportedmodel.cpp b/qt-models/diveimportedmodel.cpp index 799dd6ce6..66be4b5cf 100644 --- a/qt-models/diveimportedmodel.cpp +++ b/qt-models/diveimportedmodel.cpp @@ -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++) { |