diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-04-17 03:11:16 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-04-17 03:11:16 +0800 |
commit | a33a078d06e5c2e26885934fb679bbed4bef1527 (patch) | |
tree | 3df6db149a1c0142ee538c740f0ca180e75fd4b2 | |
parent | 740606d5b26cb4c7969157ed88891802f10fdc79 (diff) | |
download | gsoc2013-empathy-a33a078d06e5c2e26885934fb679bbed4bef1527.tar gsoc2013-empathy-a33a078d06e5c2e26885934fb679bbed4bef1527.tar.gz gsoc2013-empathy-a33a078d06e5c2e26885934fb679bbed4bef1527.tar.bz2 gsoc2013-empathy-a33a078d06e5c2e26885934fb679bbed4bef1527.tar.lz gsoc2013-empathy-a33a078d06e5c2e26885934fb679bbed4bef1527.tar.xz gsoc2013-empathy-a33a078d06e5c2e26885934fb679bbed4bef1527.tar.zst gsoc2013-empathy-a33a078d06e5c2e26885934fb679bbed4bef1527.zip |
Fix crash in DND of chat tab.
svn path=/trunk/; revision=956
-rw-r--r-- | src/empathy-chat-window.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c index f77e6f0d5..9316d9868 100644 --- a/src/empathy-chat-window.c +++ b/src/empathy-chat-window.c @@ -957,12 +957,10 @@ chat_window_drag_data_received (GtkWidget *widget, EmpathyChat *chat; EmpathyChatWindow *old_window; McAccount *account; - const gchar *id = NULL; + const gchar *id; gchar **strv; - if (selection) { - id = (const gchar*) selection->data; - } + id = (const gchar*) selection->data; empathy_debug (DEBUG_DOMAIN, "DND contact from roster with id:'%s'", id); @@ -1002,21 +1000,14 @@ chat_window_drag_data_received (GtkWidget *widget, gtk_drag_finish (context, TRUE, FALSE, time); } else if (info == DND_DRAG_TYPE_TAB) { - EmpathyChat *chat = NULL; - EmpathyChatWindow *old_window; - GtkWidget **child = NULL; + EmpathyChat **chat; + EmpathyChatWindow *old_window = NULL; empathy_debug (DEBUG_DOMAIN, "DND tab"); - if (selection) { - child = (void*) selection->data; - } - - if (child) { - chat = EMPATHY_CHAT (child); - } + chat = (void*) selection->data; + old_window = chat_window_find_chat (*chat); - old_window = chat_window_find_chat (chat); if (old_window) { EmpathyChatWindowPriv *priv; |