From 282a13ac548f033339396dcc0fae8e76e8103cbd Mon Sep 17 00:00:00 2001 From: Jonny Lamb Date: Fri, 6 Mar 2009 11:52:44 +0000 Subject: Added checks to the arguments of empathy_message_equal. Signed-off-by: Jonny Lamb svn path=/trunk/; revision=2604 --- libempathy/empathy-message.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libempathy') diff --git a/libempathy/empathy-message.c b/libempathy/empathy-message.c index 42e4a45a6..d23048a20 100644 --- a/libempathy/empathy-message.c +++ b/libempathy/empathy-message.c @@ -512,6 +512,9 @@ empathy_message_equal (EmpathyMessage *message1, EmpathyMessage *message2) EmpathyMessagePriv *priv1 = GET_PRIV (message1); EmpathyMessagePriv *priv2 = GET_PRIV (message2); + g_return_val_if_fail (EMPATHY_IS_MESSAGE (message1), FALSE); + g_return_val_if_fail (EMPATHY_IS_MESSAGE (message2), FALSE); + if (priv1->id == priv2->id && g_str_hash (priv1->body) == g_str_hash (priv2->body)) { return TRUE; } -- cgit v1.2.3