diff options
author | Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk> | 2011-04-27 17:41:27 +0800 |
---|---|---|
committer | Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk> | 2011-04-27 17:41:27 +0800 |
commit | 26e0b0ef4bbc17ab1205858be530ca91f879288d (patch) | |
tree | cf43ceb048d8e291b9c164163a93d729aa054a27 | |
parent | 65a167e60a8543a6cf85ba43c8934d4e6af28407 (diff) | |
download | gsoc2013-empathy-26e0b0ef4bbc17ab1205858be530ca91f879288d.tar gsoc2013-empathy-26e0b0ef4bbc17ab1205858be530ca91f879288d.tar.gz gsoc2013-empathy-26e0b0ef4bbc17ab1205858be530ca91f879288d.tar.bz2 gsoc2013-empathy-26e0b0ef4bbc17ab1205858be530ca91f879288d.tar.lz gsoc2013-empathy-26e0b0ef4bbc17ab1205858be530ca91f879288d.tar.xz gsoc2013-empathy-26e0b0ef4bbc17ab1205858be530ca91f879288d.tar.zst gsoc2013-empathy-26e0b0ef4bbc17ab1205858be530ca91f879288d.zip |
Don't leak the account and entity
-rw-r--r-- | libempathy-gtk/empathy-log-window.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c index b7856323f..ec0fa413a 100644 --- a/libempathy-gtk/empathy-log-window.c +++ b/libempathy-gtk/empathy-log-window.c @@ -297,13 +297,16 @@ toolbutton_profile_clicked (GtkToolButton *toolbutton, -1); } - g_return_if_fail (type == COL_TYPE_NORMAL); - - contact = empathy_contact_from_tpl_contact (account, target); - empathy_contact_information_dialog_show (contact, - GTK_WINDOW (window->window)); + if (type == COL_TYPE_NORMAL) + { + contact = empathy_contact_from_tpl_contact (account, target); + empathy_contact_information_dialog_show (contact, + GTK_WINDOW (window->window)); + g_object_unref (contact); + } + else + g_warn_if_reached (); - g_object_unref (contact); g_object_unref (account); g_object_unref (target); } |