diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | gio/giomm/contenttype.cc | 7 |
2 files changed, 10 insertions, 3 deletions
@@ -1,3 +1,9 @@ +2012-09-07 Murray Cumming <murrayc@murrayc.com> + + ContentType: get_icon(): Fix a refcount error. + + * gio/giomm/contenttype.cc: get_icon(): Take a reference. + 2.32.1: 2012-07-10 Krzesimir Nowak <qdlacz@gmail.com> diff --git a/gio/giomm/contenttype.cc b/gio/giomm/contenttype.cc index c0c3a499..f46534b9 100644 --- a/gio/giomm/contenttype.cc +++ b/gio/giomm/contenttype.cc @@ -50,9 +50,10 @@ Glib::ustring content_type_get_mime_type(const Glib::ustring& type) Glib::RefPtr<Gio::Icon> content_type_get_icon(const Glib::ustring& type) { - //TODO: Does g_content_type_get_icon() return a reference? - //It currently has no implementation so it's hard to know. murrayc. - return Glib::wrap(g_content_type_get_icon(type.c_str())); + Glib::RefPtr<Icon> retvalue = Glib::wrap(g_content_type_get_icon(type.c_str())); + if(retvalue) + retvalue->reference(); //The function does not do a ref for us. + return retvalue; } bool content_type_can_be_executable(const Glib::ustring& type) |