[gtkmm] unreferencing Glib::RefPtr
- From: Enrico Costanza <ec142 york ac uk>
- To: gtkmm-list gnome org
- Subject: [gtkmm] unreferencing Glib::RefPtr
- Date: Thu, 24 Apr 2003 09:41:11 +0200
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]