summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHuang Peng <shawn.p.huang@gmail.com>2008-10-03 10:30:08 +0800
committerHuang Peng <shawn.p.huang@gmail.com>2008-10-03 10:30:08 +0800
commit7ff16d509e2e077ac2e26de146dbc4a7e34748a6 (patch)
tree6cfbd9d318dcf49e9904019a776decf4f145ee3d
parent927200df0bb7f559110dd624d2e52412220447d8 (diff)
downloadibus-7ff16d509e2e077ac2e26de146dbc4a7e34748a6.tar.gz
ibus-7ff16d509e2e077ac2e26de146dbc4a7e34748a6.tar.xz
ibus-7ff16d509e2e077ac2e26de146dbc4a7e34748a6.zip
Fix problem in ibus_attr_list_copy.
-rw-r--r--lib/gtk2/ibusattribute.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gtk2/ibusattribute.c b/lib/gtk2/ibusattribute.c
index f94a93f..eb1e717 100644
--- a/lib/gtk2/ibusattribute.c
+++ b/lib/gtk2/ibusattribute.c
@@ -41,6 +41,7 @@ ibus_attribute_new (guint type, guint value, guint start_index, guint end_index)
type == IBUS_ATTR_TYPE_BACKGROUND, NULL);
IBusAttribute *attr = g_slice_new (IBusAttribute);
+
attr->type = type;
attr->value = value;
attr->start_index = start_index;
@@ -117,7 +118,7 @@ ibus_attr_list_copy (IBusAttrList *attr_list)
if (attr == NULL) {
break;
}
- ibus_attr_list_append (new_list, attr);
+ ibus_attr_list_append (new_list, ibus_attribute_copy (attr));
}
return new_list;
}
@@ -138,6 +139,7 @@ ibus_attr_list_unref (IBusAttrList *attr_list)
if (attr_list == NULL) {
return;
}
+
attr_list->refcount --;
if (attr_list->refcount <= 0) {
guint i;