On Tue, 14 Oct 2008 18:03:05 +0200 nico <[EMAIL PROTECTED]> wrote: > Thank you Nicola, > > > And you're also g_freeing a GFileInfo, which is a GObject. Try > > to use g_object_unref() instead. > > > > Ciao > > > When I use g_object_unref() instead of g_free(file_info); I've got > this error : > > (process:30949): GLib-GObject-CRITICAL **: g_object_unref: assertion > `G_IS_OBJECT (object)' failed
Because you are unrefing it in the wrong place. Now you have: while ((file_info = g_file_enumerator_next_file()) != NULL) { ... } g_object_unref(file_info); Here file_info is surely NULL and you're lacking tons of refs. You must do instead: while ((file_info = g_file_enumerator_next_file()) != NULL) { ... g_object_unref(file_info); } Ciao -- Nicola _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list