summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rcm-client-hardware-list.c5
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();