diff options
author | David Härdeman <david@hardeman.nu> | 2015-08-14 10:57:02 +0200 |
---|---|---|
committer | David Härdeman <david@hardeman.nu> | 2015-08-14 10:57:02 +0200 |
commit | baba493b7cdb3b162aab65ba44b4ea964ec33c39 (patch) | |
tree | b55d0bc6c8219ad4d1c549b5ef68c77d62c22c68 | |
parent | 96b395f777aa39a92ce321519d307a5ac5a62464 (diff) |
Fix list box finding logic in rcng_client_hardware_list_add()
-rw-r--r-- | rcm-client-hardware-list.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rcm-client-hardware-list.c b/rcm-client-hardware-list.c index 068c902..81f0707 100644 --- a/rcm-client-hardware-list.c +++ b/rcm-client-hardware-list.c @@ -157,7 +157,10 @@ void rcng_client_hardware_list_add(GDBusObject *hw) gtk_widget_show_all(row); hw_list_swin = GTK_WIDGET(gtk_builder_get_object(global->builder, "hardware_page_swin")); - hw_list_box = gtk_bin_get_child(GTK_BIN(hw_list_swin)); + for (hw_list_box = gtk_bin_get_child(GTK_BIN(hw_list_swin)); + hw_list_box && !GTK_IS_LIST_BOX(hw_list_box); + hw_list_box = gtk_bin_get_child(GTK_BIN(hw_list_box))) + /* Do nothing */; if (!hw_list_box) { hw_list_box = gtk_list_box_new(); |