From 5687abdae9a88c9399064606bc9ce22fec969d68 Mon Sep 17 00:00:00 2001 From: Hannu Mallat Date: Mon, 29 Sep 2014 13:28:45 +0300 Subject: [PATCH] [connectionagent] Check for null pointer before debugging Check pointer value before debugging to avoid null pointer dereference. --- connd/qconnectionagent.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/connd/qconnectionagent.cpp b/connd/qconnectionagent.cpp index 9155e2c..f5b6031 100644 --- a/connd/qconnectionagent.cpp +++ b/connd/qconnectionagent.cpp @@ -497,7 +497,10 @@ void QConnectionAgent::technologyPowerChanged(bool powered) NetworkTechnology *tech = static_cast(sender()); if (tech->type() != "wifi") return; - qDebug() << tetheringWifiTech->name() << powered; + if (tetheringWifiTech) + qDebug() << tetheringWifiTech->name() << powered; + else + qDebug() << "tetheringWifiTech is null"; if (netman && powered && delayedTethering) { // wifi tech might not be ready, so delay this