Fixed crash on abort function not initialized
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
20e0cb43b9
commit
2d91bd09d4
3 changed files with 14 additions and 0 deletions
|
@ -234,6 +234,12 @@ void ResourceModel::loadEntry(QModelIndex& entry)
|
|||
return;
|
||||
QMessageBox::critical(nullptr, tr("Error"), tr("A network error occurred. Could not load project info:%1").arg(reason));
|
||||
};
|
||||
if (!callbacks.on_abort)
|
||||
callbacks.on_abort = [this] {
|
||||
if (!s_running_models.constFind(this).value())
|
||||
return;
|
||||
qCritical() << tr("The request was abborted for an unknown reason");
|
||||
};
|
||||
|
||||
if (auto job = m_api->getProjectInfo(std::move(args), std::move(callbacks)); job)
|
||||
runInfoJob(job);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue