mirror of
https://github.com/altlinux/ALTMediaWriter.git
synced 2024-10-26 08:55:03 +03:00
check for null item in ReleaseManager::get()
This commit is contained in:
parent
88723310d1
commit
e18f084bde
@ -86,10 +86,15 @@ bool ReleaseManager::filterAcceptsRow(int source_row, const QModelIndex &source_
|
||||
|
||||
Release *ReleaseManager::get(int index) const {
|
||||
QStandardItem *item = m_sourceModel->item(index);
|
||||
QVariant variant = item->data();
|
||||
Release *release = variant.value<Release *>();
|
||||
|
||||
if (item != nullptr) {
|
||||
QVariant variant = item->data();
|
||||
Release *release = variant.value<Release *>();
|
||||
|
||||
return release;
|
||||
return release;
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void ReleaseManager::downloadMetadata() {
|
||||
|
Loading…
Reference in New Issue
Block a user