Fixed some crashes
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
@ -240,10 +240,13 @@ void ResourcePage::updateSelectionButton()
|
||||
}
|
||||
|
||||
m_ui->resourceSelectionButton->setEnabled(true);
|
||||
if (!getCurrentPack()->isVersionSelected(m_selected_version_index)) {
|
||||
m_ui->resourceSelectionButton->setText(tr("Select %1 for download").arg(resourceString()));
|
||||
if (getCurrentPack()) {
|
||||
if (!getCurrentPack()->isVersionSelected(m_selected_version_index))
|
||||
m_ui->resourceSelectionButton->setText(tr("Select %1 for download").arg(resourceString()));
|
||||
else
|
||||
m_ui->resourceSelectionButton->setText(tr("Deselect %1 for download").arg(resourceString()));
|
||||
} else {
|
||||
m_ui->resourceSelectionButton->setText(tr("Deselect %1 for download").arg(resourceString()));
|
||||
qWarning() << "Try to update selection but there is not a pack selected";
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user