Skip to content

Commit

Permalink
network: Fix an assertion failure
Browse files Browse the repository at this point in the history
Entering the Wi-Fi page without connected to a network trips an
assertion failure:

  (gnome-control-center:14943): nm-CRITICAL **: 16:36:16.732: nm_access_point_get_frequency: assertion 'NM_IS_ACCESS_POINT(ap)' failed

  Thread 1 "gnome-control-c" received signal SIGTRAP, Trace/breakpoint trap.
  0x00007ffff7c8ee51 in g_logv () from /lib64/libglib-2.0.so.0
  (gdb) bt
  #0  0x00007ffff7c8ee51 in g_logv () at /lib64/libglib-2.0.so.0
  #1  0x00007ffff7c8f0d3 in g_log () at /lib64/libglib-2.0.so.0
  #2  0x00007ffff63b7b8a in nm_access_point_get_frequency () at /lib64/libnm.so.0
  #3  0x00000000005965b1 in connect_details_page (self=0x4658210) at ../panels/network/connection-editor/ce-page-details.c:264
  #4  0x0000000000597f9e in ce_page_details_new (connection=0xfbde70, device=0xd52360, ap=0x0, editor=0x50a4350) at ../panels/network/connection-editor/ce-page-details.c:570
  #5  0x0000000000593273 in net_connection_editor_set_connection (self=0x50a4350, connection=0x7fffcc096770) at ../panels/network/connection-editor/net-connection-editor.c:522
  #6  0x0000000000593f7d in net_connection_editor_new (connection=0x7fffcc096770, device=0xd52360, ap=0x0, client=0xd3a0c0) at ../panels/network/connection-editor/net-connection-editor.c:790
  #7  0x0000000000582b16 in show_details_for_row (self=0xcc3040, row=0x46587b0, list=0x4273b40) at ../panels/network/net-device-wifi.c:987
  #8  0x00007ffff7d83845 in g_cclosure_marshal_VOID__OBJECTv () at /lib64/libgobject-2.0.so.0
  #9  0x00007ffff7da1b79 in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
  #10 0x00007ffff7da1eb8 in g_signal_emit_by_name () at /lib64/libgobject-2.0.so.0
  #11 0x000000000058d41f in on_row_configured_cb (self=0x4273b40, row=0x46587b0) at ../panels/network/cc-wifi-connection-list.c:251
  #12 0x00007ffff7da1b79 in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
  #13 0x00007ffff7da1eb8 in g_signal_emit_by_name () at /lib64/libgobject-2.0.so.0
  #14 0x000000000058c4c4 in configure_clicked_cb (self=0x46587b0) at ../panels/network/cc-wifi-connection-row.c:513
  #15 0x00007ffff7da1b79 in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
  #16 0x00007ffff7da1cb3 in g_signal_emit () at /lib64/libgobject-2.0.so.0
  ...
  • Loading branch information
lkundrak authored and fossfreedom committed Jan 19, 2023
1 parent 95ca202 commit 2d119d5
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions panels/network/connection-editor/ce-page-details.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,13 +258,11 @@ connect_details_page (CEPageDetails *self)
sc = nm_connection_get_setting_connection (self->connection);
type = nm_setting_connection_get_connection_type (sc);

if (NM_IS_DEVICE_WIFI (self->device)) {
if (NM_IS_DEVICE_WIFI (self->device))
active_ap = nm_device_wifi_get_active_access_point (NM_DEVICE_WIFI (self->device));
frequency = nm_access_point_get_frequency (active_ap);
} else {
else
active_ap = NULL;
frequency = 0;
}
frequency = active_ap ? nm_access_point_get_frequency (active_ap) : 0;

state = self->device ? nm_device_get_state (self->device) : NM_DEVICE_STATE_DISCONNECTED;

Expand Down

0 comments on commit 2d119d5

Please sign in to comment.