aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-04-17 03:11:16 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-04-17 03:11:16 +0800
commita33a078d06e5c2e26885934fb679bbed4bef1527 (patch)
tree3df6db149a1c0142ee538c740f0ca180e75fd4b2 /src
parent740606d5b26cb4c7969157ed88891802f10fdc79 (diff)
downloadgsoc2013-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
Diffstat (limited to 'src')
-rw-r--r--src/empathy-chat-window.c21
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;