diff --git a/gio/gicon.c b/gio/gicon.c index cd69922f1..1f1ccd30d 100644 --- a/gio/gicon.c +++ b/gio/gicon.c @@ -331,7 +331,7 @@ g_icon_new_from_tokens (char **tokens, goto out; } - klass = g_type_class_ref (type); + klass = g_type_class_get (type); if (klass == NULL) { g_set_error (error, @@ -382,8 +382,6 @@ g_icon_new_from_tokens (char **tokens, icon = icon_iface->from_tokens (tokens + 1, num_tokens - 1, version, error); out: - if (klass != NULL) - g_type_class_unref (klass); return icon; } @@ -494,11 +492,10 @@ g_icon_deserialize_emblem (GVariant *value) GEnumClass *origin_class; GEnumValue *origin_value; - origin_class = g_type_class_ref (G_TYPE_EMBLEM_ORIGIN); + origin_class = g_type_class_get (G_TYPE_EMBLEM_ORIGIN); origin_value = g_enum_get_value_by_nick (origin_class, origin_nick); if (origin_value) emblem = g_emblem_new_with_origin (emblem_icon, origin_value->value); - g_type_class_unref (origin_class); } /* We didn't create it with an origin, so do it without. */