Empathy Hard code freeze exception request: 2 crashers



Hi guys,

I did some stress testing and found 2 crashers. I can't link any bug as
the bugzilla is down but here is the branch and diff:

http://git.collabora.co.uk/?p=user/cassidy/empathy;a=shortlog;h=refs/heads/crashes

The patches have already been reviewed by Pochu.


Thanks,


	G.

-- 
Guillaume Desmottes <gdesmott gnome org>
Jabber <cassidy jabber belnet be>
GPG 1024D/711E31B1 | 1B5A 1BA8 11AA F0F1 2169  E28A AC55 8671 711E 31B1
>From 26ac10366710eb6e60539421ccf88c5e6833a58b Mon Sep 17 00:00:00 2001
From: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Wed, 23 Mar 2011 14:26:29 +0100
Subject: [PATCH 1/2] tp_chat_got_renamed_contacts_cb: use tp_clear_object() to unref priv->user

If priv->user and old are both NULL, we used to crash.
---
 libempathy/empathy-tp-chat.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index 86aca44..6d29807 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -1090,7 +1090,7 @@ tp_chat_got_renamed_contacts_cb (TpConnection            *connection,
 
 	if (priv->user == old) {
 		/* We change our nick */
-		g_object_unref (priv->user);
+		tp_clear_object (&priv->user);
 		priv->user = g_object_ref (new);
 	}
 
-- 
1.7.4.1

>From b7a5f478cc1e3828504f653b4a66b22f28523cb7 Mon Sep 17 00:00:00 2001
From: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Wed, 23 Mar 2011 14:27:19 +0100
Subject: [PATCH 2/2] chat_window_new_message_cb: check that we found the chatroom

There is a race, if the chatroom manager didn't parse the chatrooms list yet,
this was crashing.
---
 src/empathy-chat-window.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index bf1ef6b..aacc301 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -1451,7 +1451,7 @@ chat_window_new_message_cb (EmpathyChat       *chat,
 		chatroom = empathy_chatroom_manager_find (priv->chatroom_manager,
 							  account, room);
 
-		if (empathy_chatroom_is_always_urgent (chatroom)) {
+		if (chatroom != NULL && empathy_chatroom_is_always_urgent (chatroom)) {
 			needs_urgency = TRUE;
 		} else {
 			needs_urgency = empathy_message_should_highlight (message);
-- 
1.7.4.1



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]