aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChandni Verma <chandniverma2112@gmail.com>2011-03-11 10:20:51 +0800
committerChandni Verma <chandniverma2112@gmail.com>2011-03-11 10:20:51 +0800
commitdfbccc45923082027415c3c76322febf470c5901 (patch)
treee3310bc8f20b02767e089a0eb56b9c981f7febaa /src
parent81ba0edc73b6a226a054b76539645b7b4e5e2a99 (diff)
downloadgsoc2013-empathy-dfbccc45923082027415c3c76322febf470c5901.tar
gsoc2013-empathy-dfbccc45923082027415c3c76322febf470c5901.tar.gz
gsoc2013-empathy-dfbccc45923082027415c3c76322febf470c5901.tar.bz2
gsoc2013-empathy-dfbccc45923082027415c3c76322febf470c5901.tar.lz
gsoc2013-empathy-dfbccc45923082027415c3c76322febf470c5901.tar.xz
gsoc2013-empathy-dfbccc45923082027415c3c76322febf470c5901.tar.zst
gsoc2013-empathy-dfbccc45923082027415c3c76322febf470c5901.zip
Setting "window" data on submenu only if it's not NULL
Diffstat (limited to 'src')
-rw-r--r--src/empathy-chat-window.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 73856adde..23c93a15b 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -418,10 +418,10 @@ chat_window_contact_menu_update (EmpathyChatWindowPriv *priv,
if (orig_submenu == NULL || !gtk_widget_get_visible (orig_submenu)) {
submenu = empathy_chat_get_contact_menu (priv->current_chat);
- /* gtk_menu_attach_to_widget() doesn't behave nicely here */
- g_object_set_data (G_OBJECT (submenu), "window", priv->dialog);
-
if (submenu != NULL) {
+ /* gtk_menu_attach_to_widget() doesn't behave nicely here */
+ g_object_set_data (G_OBJECT (submenu), "window", priv->dialog);
+
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu), submenu);
gtk_widget_show (menu);
gtk_widget_set_sensitive (menu, TRUE);