GNOME Bugzilla – Bug 112321
Gtk::Image::get_pixbuf problems unreferencing Glib::RefPtr PATCH
Last modified: 2004-12-22 21:47:04 UTC
I am trying to create a Gtk::Image from a Gdk::Pixbuf and then update the same pixbuf. i.e.: Gdk::Pixbuf *pixbuf; Gtk::Image *image; pixbuf = Gdk::Pixbuf::create_from_file("1.png"); image = manage( new Gtk::Image(pixbuf) ); pixbuf = image->get_pixbuf(); but I get: (test:1769): GLib-GObject-CRITICAL **: file gobject.c: line 1337 (g_object_unref): assertion `G_IS_OBJECT (object)' failed If I create the image from a copy of the pixbuf (using pixbuf->copy in the image constructor), I get the same. I submit a patch (see ChangeLog) done under guidance from Murray Cummings. I have tested the changes with positive results.
Created attachment 16275 [details] [review] patch for the reported bug
Applied. Thanks.