Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[connectionagent] Check for null pointer before debugging
Check pointer value before debugging to avoid null pointer
dereference.
  • Loading branch information
Hannu Mallat committed Sep 29, 2014
1 parent 576ad3a commit 5687abd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion connd/qconnectionagent.cpp
Expand Up @@ -497,7 +497,10 @@ void QConnectionAgent::technologyPowerChanged(bool powered)
NetworkTechnology *tech = static_cast<NetworkTechnology *>(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
Expand Down

0 comments on commit 5687abd

Please sign in to comment.