Re: Segfault and cheep mend of gtk_combo_box_get_active_text



Global response for short :

Selecter now is :
void selecter(GtkComboBox *combo, gpointer user_data)
{
    gchar *name;
    if (user_data != NULL){printf("What ???");};
    if (combo != GTK_COMBO_BOX(my_combo_box))
        printf("not initialized!!!\n");

    printf("line %d\n", __LINE__);
    if (combo != NULL) {
        printf("line %d\n", __LINE__);
        name = gtk_combo_box_get_active_text(GTK_COMBO_BOX(combo));
        printf("line %d\n", __LINE__);
        if (name == NULL) {
            printf("line %d\n", __LINE__);
            printf("What are we doing in here ???");
            printf("line %d\n", __LINE__);
        } else {
            printf("line %d\n", __LINE__);
            printf("Ok %s \n", name);
            printf("line %d\n", __LINE__);
        };};
}
and selecting answers that
  user_data is indeed NULL
  combo is my_combo_box up to cast
  combo is non NULL
  instruction "name = gtk_combo_box_get_active_entry..."
               yields the segfaut.
:-(
Sunny day on a stubborn script :-)
Best, Olivier




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]