Merge lp:~cyphermox/indicator-server/active-conn-dev into lp:indicator-server

Proposed by Mathieu Trudel-Lapierre
Status: Merged
Approved by: Renato Araujo Oliveira Filho
Approved revision: 235
Merged at revision: 235
Proposed branch: lp:~cyphermox/indicator-server/active-conn-dev
Merge into: lp:indicator-server
Diff against target: 12 lines (+1/-1)
1 file modified
network/network-action-manager.vala (+1/-1)
To merge this branch: bzr merge lp:~cyphermox/indicator-server/active-conn-dev
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Renato Araujo Oliveira Filho (community) Approve
Review via email: mp+173070@code.launchpad.net

Commit message

Don't crash if there are no devices listed for the active connection yet.

Description of the change

Don't crash if there are no devices listed for the active connection yet.

To post a comment you must log in.
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

looks good

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'network/network-action-manager.vala'
2--- network/network-action-manager.vala 2013-05-30 14:30:51 +0000
3+++ network/network-action-manager.vala 2013-07-04 17:50:33 +0000
4@@ -408,7 +408,7 @@
5 private void set_wifi_device ()
6 {
7 uint8 strength = 0;
8- var dev = act_conn.get_devices ().get(0) as NM.DeviceWifi;
9+ var dev = act_conn.get_devices () != null ? act_conn.get_devices ().get(0) as NM.DeviceWifi : null;
10 if (dev != null)
11 {
12 dev.notify["active-access-point"].connect (active_access_point_changed);

Subscribers

People subscribed via source and target branches