Re: GtkFileSelection delayed crash with patch



Hans Breuer <hans breuer org> writes:

> Try:
> 
> testgtk::file selection
> OK
> testgtk::flipping
> toggle direction -> Whoops (dangling pointer in toplevel_list)
> 
> appears to be a problem with the missing call to parent_class->finalize 
> in gtkfilesel.c(gtk_file_selection_finalize)
> 
> (There may be another broken finalize handler in gtktreemodelsort.c
>  but there i'm not sure)

Yes, that's a problem too ... all finalize methods must chain up.
 
> The following patch cures it. Ok to apply ?
> 
> 	* gtk/gtkfilesel.c (gtk_file_selection_finalize) : chain
> 	finalize to parent class to get removed from the toplevel_list

Ah good, I think that might be a fix for the problem in #63474, though
that would need verification.
 
> --- from-cvs/gtk+/gtk/gtkfilesel.c	Sat Nov 03 12:54:24 2001
> +++ my-gtk/gtk+/gtk/gtkfilesel.c	Sat Nov 03 18:29:48 2001
> @@ -1168,6 +1168,8 @@
>    GtkFileSelection *filesel = GTK_FILE_SELECTION (object);
>  
>    g_free (filesel->fileop_file);
> +
> +  G_OBJECT_CLASS (parent_class)->finalize (object);
>  }

Please commit, and if you could fix GtkTreeModelSort as well,
that would be appreciated.
                                        Owen



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