RE: [gtkmm] unreferencing Glib::RefPtr



This
http://cvs.gnome.org/lxr/source/gtkmm-root/gtk-src/image.hg#83
probably needs the extra refreturn parameter. It would be great if you could
test than and submit a patch if it fixes the problem.

Murray Cumming
murrayc usa net
www.murrayc.com 

> -----Original Message-----
> From: Enrico Costanza [mailto:ec142 york ac uk] 
> Sent: Donnerstag, 24. April 2003 09:41
> To: gtkmm-list gnome org
> Subject: [gtkmm] unreferencing Glib::RefPtr
> 
> 
> Dear all,
> 
> 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.
> Am I misusing the RefPtr, or is this a bug?
> 
> Thanks in advance,
> Enrico Costanza
> 
> 
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
> 



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