gnome_dialog_set_parent seg fault

In GnomeHack, I have begun seeing a bunch of seg faults related
to gnome_dialog_set_parent:

Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkObject'

Program received signal SIGSEGV, Segmentation fault.
0x402245cc in gtk_window_set_transient_for () from /usr/lib/
(gdb) bt
#0  0x402245cc in gtk_window_set_transient_for () from /usr/lib/
#1  0x40389f76 in gnome_dialog_set_parent () from /usr/lib/
#2  0x816c95f in ghack_menu_window_display (menuWin=0x83aca08, blocking=0, 
    data=0x0) at GnomeHackMenuWindow.c:168

I'm quite puzzled as to what could be going on here. I think I'm
checking for most everything here -- if it was the parameters I
am passing in, I would expect the g_asserts I have included to be
triggered: Anybody have any idea why this is crashing, and what I can do
about it (other than removing the gnome_dialog_set_parent() call?

ghack_menu_window_display(GtkWidget *menuWin, gboolean blocking,
                          gpointer *data)
    /* Center the dialog over parent */
    GtkWidget *parent = ghack_get_main_window ();
    g_assert (parent != NULL);
    g_assert (menuWin != NULL);
    g_assert (GTK_IS_WINDOW (parent));
    g_assert (GNOME_IS_DIALOG (menuWin));
    gnome_dialog_set_parent (GNOME_DIALOG (menuWin), GTK_WINDOW (parent));

    /* FIXME: select_menu is really where window display should occur */
        gnome_dialog_run_and_close (GNOME_DIALOG (menuWin));


Erik B. Andersen   Web: 
--This message was written using 73% post-consumer electrons--

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