Commit 35bce4fc authored by Pasi Sjöholm's avatar Pasi Sjöholm

[connectionagent] do not crash if tethering interface disappears

parent 057a9e41
......@@ -155,6 +155,7 @@ void QConnectionAgent::onErrorReported(const QString &servicePath, const QString
if (error == "connect-failed" && servicePath.contains("cellular") && netman->offlineMode())
return;
if (!tetheringWifiTech) return;
// Suppress errors when switching to tethering mode
if ((delayedTethering || tetheringWifiTech->tethering()) && servicePath.contains(QStringLiteral("wifi")))
return;
......@@ -825,6 +826,8 @@ void QConnectionAgent::startTethering(const QString &type)
confFile.setValue("tetheringType",type);
delayedTethering = true;
tetheringWifiTech = tetherTech;
if (!techPowered) {
tetherTech->setPowered(true);
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment