summaryrefslogtreecommitdiff
path: root/libempathy/empathy-message.c
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2009-03-06 11:52:44 +0000
committerXavier Claessens <xclaesse@src.gnome.org>2009-03-06 11:52:44 +0000
commit282a13ac548f033339396dcc0fae8e76e8103cbd (patch)
tree2422b6186cd43c9be76ab75d0dca7eeee5c2d419 /libempathy/empathy-message.c
parent15d9dbd80834fd5bd7efcf0d751fc88d879e0177 (diff)
Added checks to the arguments of empathy_message_equal.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk> svn path=/trunk/; revision=2604
Diffstat (limited to 'libempathy/empathy-message.c')
-rw-r--r--libempathy/empathy-message.c3
1 files changed, 3 insertions, 0 deletions
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;
}