aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-theme-adium.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c
index 0464a6193..f37c98841 100644
--- a/libempathy-gtk/empathy-theme-adium.c
+++ b/libempathy-gtk/empathy-theme-adium.c
@@ -1026,7 +1026,7 @@ empathy_adium_data_ref (EmpathyAdiumData *data)
{
g_return_val_if_fail (data != NULL, NULL);
- data->ref_count++;
+ g_atomic_int_inc (&data->ref_count);
return data;
}
@@ -1036,8 +1036,7 @@ empathy_adium_data_unref (EmpathyAdiumData *data)
{
g_return_if_fail (data != NULL);
- data->ref_count--;
- if (data->ref_count == 0) {
+ if (g_atomic_int_dec_and_test (&data->ref_count)) {
g_free (data->path);
g_free (data->basedir);
g_free (data->template_html);