Commit 37a92460 authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Check for device not being null

In almost all places we use NetworkManager::findNetworkInterface we
later check for the device is not null, do the same here

BUGS: 393707

Reviewers: #plasma, jgrulich

Reviewed By: jgrulich

Subscribers: plasma-devel

Tags: #plasma

Differential Revision:
parent c3a9cb76
......@@ -594,7 +594,9 @@ void NetworkModel::activeVpnConnectionStateChanged(NetworkManager::VpnConnection
void NetworkModel::availableConnectionAppeared(const QString& connection)
NetworkManager::Device::Ptr device = NetworkManager::findNetworkInterface(qobject_cast<NetworkManager::Device*>(sender())->uni());
addAvailableConnection(connection, device);
if (device) {
addAvailableConnection(connection, device);
void NetworkModel::availableConnectionDisappeared(const QString& connection)
Supports Markdown
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