mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-10-04 01:00:22 +00:00
GH-4299 Don't hard crash on when missing network
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user