Fix crash when opening the backup manager before the first scan.

This commit is contained in:
codestation
2013-12-22 20:11:34 -04:30
parent c2558b6b2a
commit 3848873ccf

View File

@@ -139,6 +139,13 @@ void BackupManagerForm::loadBackupListing(int index)
// get the item list // get the item list
metadata_t *meta; metadata_t *meta;
int row_count = db->filterObjects(ohfi, &meta); int row_count = db->filterObjects(ohfi, &meta);
// exit if there aren't any items
if(row_count == 0) {
db->mutex.unlock();
return;
}
ui->tableWidget->setRowCount(row_count); ui->tableWidget->setRowCount(row_count);
// adjust the table item width to fill all the widget // adjust the table item width to fill all the widget