Fixed crash at status box despawning #24

Merged
asmeron merged 1 commits from YanTheKaller/libublsettings-gtk3:master into master 1 year ago

@ -928,21 +928,30 @@ int yon_ubl_status_box_spawn_infinite(GtkContainer *container, char *status_id,
} }
} }
int delete_busy=0;
int _yon_ubl_status_box_despawn_infinite(GtkContainer *container){ int _yon_ubl_status_box_despawn_infinite(GtkContainer *container){
if (yon_status_thread_id){ if (!delete_busy){
free(yon_status_thread_id); delete_busy=1;
yon_status_thread_id=NULL; if (yon_status_thread_id){
} free(yon_status_thread_id);
GList *list = gtk_container_get_children(container); yon_status_thread_id=NULL;
for (int i=0; i<g_list_length(list);i++){ }
GtkWidget *revealer = g_list_nth_data(list,i); GList *list = gtk_container_get_children(container);
if (GTK_IS_REVEALER(revealer)){ for (int i=0; i<g_list_length(list);i++){
gtk_revealer_set_reveal_child(GTK_REVEALER(revealer),0); GtkWidget *revealer = g_list_nth_data(list,i);
usleep(200000); g_list_free(list);
if (GTK_IS_REVEALER(revealer)){ if (GTK_IS_REVEALER(revealer)){
gtk_widget_destroy(revealer); gtk_revealer_set_reveal_child(GTK_REVEALER(revealer),0);
usleep(200000);
list = gtk_container_get_children(container);
if (g_list_length>0){
if (GTK_IS_REVEALER(revealer)){
gtk_widget_destroy(revealer);
}
}
} }
} }
delete_busy=0;
} }
} }

Loading…
Cancel
Save