From 944086b528dbae1a76161d8c7cc52cbd5394a3fc Mon Sep 17 00:00:00 2001 From: Slava Monich Date: Mon, 12 Jun 2017 16:58:30 +0300 Subject: [PATCH] [connectionagent] Set delayedTethering to false when clearing tetheringWifiTech pointer. Fixes JB#38937 The assumption seems to be that if delayedTethering is true then tetheringWifiTech is never NULL. If that happens not to be the case then QConnectionAgent::serviceStateChanged can (and does) crash. --- connd/qconnectionagent.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/connd/qconnectionagent.cpp b/connd/qconnectionagent.cpp index a13a79d..949adaa 100644 --- a/connd/qconnectionagent.cpp +++ b/connd/qconnectionagent.cpp @@ -1,9 +1,8 @@ /**************************************************************************** ** -** Copyright (C) 2014 Jolla Ltd +** Copyright (C) 2014-2017 Jolla Ltd ** Contact: lorn.potter@gmail.com ** -** ** GNU Lesser General Public License Usage ** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software @@ -484,6 +483,7 @@ void QConnectionAgent::techChanged() knownTechnologies.clear(); } if (!netman->getTechnology("wifi")) { + delayedTethering = false; tetheringWifiTech = 0; return; }