diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-12-15 05:30:43 (GMT) |
---|---|---|
committer | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-12-15 05:34:15 (GMT) |
commit | e75980a322ea1088e1c6bf60259b8ba853d32444 (patch) | |
tree | 164656430a4eddc39751b4015380a5c05b0782e6 /src/plugins/bearer/networkmanager | |
parent | 6c1050611c91a88cdeaf62efe581c477873db2dc (diff) | |
download | Qt-e75980a322ea1088e1c6bf60259b8ba853d32444.zip Qt-e75980a322ea1088e1c6bf60259b8ba853d32444.tar.gz Qt-e75980a322ea1088e1c6bf60259b8ba853d32444.tar.bz2 |
Fix possible null pointer dereference.
When parsing a new connection an access point with the same SSID may not
have been previously seen.
Task-number: QTBUG-15276
Diffstat (limited to 'src/plugins/bearer/networkmanager')
-rw-r--r-- | src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp index 554f9b7..f93b605 100644 --- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp +++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp @@ -743,9 +743,11 @@ QNetworkConfigurationPrivate *QNetworkManagerEngine::parseConnection(const QStri QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.take(accessPointId); - mutex.unlock(); - emit configurationRemoved(ptr); - mutex.lock(); + if (ptr) { + mutex.unlock(); + emit configurationRemoved(ptr); + mutex.lock(); + } } break; } |