GNOME Bugzilla – Bug 583037
Reference counting for return value of Gtk::IconView::get_model() is not proper
Last modified: 2009-05-18 15:59:54 UTC
Please check: http://git.gnome.org/cgit/gtkmm/tree/gtk/src/iconview.hg line:58 Now look at: http://git.gnome.org/cgit/gtkmm/tree/gtk/src/treeview.hg line 124 in iconview.hg the definition should be: _WRAP_METHOD(Glib::RefPtr<TreeModel> get_model(), gtk_icon_view_get_model, refreturn) Due to this the following code will lead to overall application crash: Item SomeDerivedClassFromIconView::get_item_from_path( const Gtk::TreeModel::Path &path ) { const TreeViewPtr &model = get_model(); //Do some thing to get item return item; } As a work-around we are using: Item SomeDerivedClassFromIconView::get_item_from_path( const Gtk::TreeModel::Path &path ) { const TreeViewPtr &model = get_model(); g_object_ref( model->gobj() ); //Do some thing to get item return item; }
Yes. Corrected in git. Thanks.