Re: [gtk-list] Found: Shortest way to trigger core-dump :-(




static void Function(void *data, GtkSignalFunc func, char *question)
{
  GtkWidget *window, *button;

  window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  gtk_signal_connect(GTK_OBJECT(window), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &window);

&window is a pointer to somerthing in the stack....

put GtkWidget *window, *button; outside you r  function, this
will resolve youe segmentation fault.
Best Regards,

Bertrand



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