diff --git a/src/forms/backupmanagerform.cpp b/src/forms/backupmanagerform.cpp index 04eca95..dbceea9 100644 --- a/src/forms/backupmanagerform.cpp +++ b/src/forms/backupmanagerform.cpp @@ -140,14 +140,14 @@ void BackupManagerForm::loadBackupListing(int index) metadata_t *meta; int row_count = db->filterObjects(ohfi, &meta); + ui->tableWidget->setRowCount(row_count); + // exit if there aren't any items if(row_count == 0) { db->mutex.unlock(); return; } - ui->tableWidget->setRowCount(row_count); - // adjust the table item width to fill all the widget QHeaderView *vert_header = ui->tableWidget->verticalHeader(); QHeaderView *horiz_header = ui->tableWidget->horizontalHeader();