Getting segmentation faults when setting text

In my program, I have a button that the user clicks to reset the text in
a text-entry area. When the button
is clicked, the handler I've written is supposed to set the text to
"default", but it causes a seg fault when I
click the button.
Here's the code that's relevant:

void reset_text(GtkWidget *widget, gpointer text_entry_box) {
  gtk_entry_set_text(GTK_ENTRY((GtkWidget *)text_entry_box), "default");


gtk_signal_connect(GTK_OBJECT(reset_button), "clicked",

What exactly am I doing wrong, and what should I do to fix it?

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