mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-05 21:06:58 +03:00
GH-4299 Don't hard crash on when missing network
This commit is contained in:
parent
4063a496d7
commit
6fe07561fe
2 changed files with 6 additions and 9 deletions
|
|
@ -98,6 +98,12 @@ void NetJob::partProgress(int index, qint64 bytesReceived, qint64 bytesTotal)
|
|||
|
||||
void NetJob::executeTask()
|
||||
{
|
||||
if(!m_network) {
|
||||
qCritical() << "Attempted to start NetJob" << objectName() << "without the network set!";
|
||||
emitFailed(tr("Internal error: NetJob '%1' has been started without a network pointer!").arg(objectName()));
|
||||
return;
|
||||
}
|
||||
|
||||
// hack that delays early failures so they can be caught easier
|
||||
QMetaObject::invokeMethod(this, "startMoreParts", Qt::QueuedConnection);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue