From fe3b0cf30499eb12103dcc1c995cbc4dc1afc069 Mon Sep 17 00:00:00 2001 From: Vivek Jain Date: Mon, 11 Jul 2005 06:36:29 +0000 Subject: check whether memory could be allocated. Return if the message is NULL so 2005-07-11 Vivek Jain * new-mail-notify.c :(send_dbus_message) check whether memory could be allocated. Return if the message is NULL so that we don't unref it again, will save crash. **Fixes #274329 sort of bugs, in case reported even after david's fix. svn path=/trunk/; revision=29705 --- plugins/new-mail-notify/new-mail-notify.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins/new-mail-notify/new-mail-notify.c') diff --git a/plugins/new-mail-notify/new-mail-notify.c b/plugins/new-mail-notify/new-mail-notify.c index 872fa80c62..dba602acf0 100644 --- a/plugins/new-mail-notify/new-mail-notify.c +++ b/plugins/new-mail-notify/new-mail-notify.c @@ -57,6 +57,9 @@ send_dbus_message (const char *message_name, const char *data) DBUS_INTERFACE, message_name); + if (message == NULL) + return; + /* Appends the data as an argument to the message */ dbus_message_append_args (message, #if DBUS_VERSION >= 310 -- cgit v1.2.3