[empathy] status_icon_update_notification: don't crash if event->message is NULL



commit ec6cebc3342d4b8777f690df0f687fc00d3d7122
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Fri Aug 7 12:21:08 2009 +0100

    status_icon_update_notification: don't crash if event->message is NULL
    
    g_markup_escape_text isn't NULL-safe so we should be sure that
    event->message is not NULL before calling it.

 src/empathy-status-icon.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/empathy-status-icon.c b/src/empathy-status-icon.c
index 79e59c5..bbb97f4 100644
--- a/src/empathy-status-icon.c
+++ b/src/empathy-status-icon.c
@@ -138,7 +138,10 @@ status_icon_update_notification (EmpathyStatusIcon *icon)
 	}
 
 	if (priv->event) {
-		gchar *message_esc = g_markup_escape_text (priv->event->message, -1);
+		gchar *message_esc = NULL;
+
+		if (priv->event->message != NULL)
+			message_esc = g_markup_escape_text (priv->event->message, -1);
 
 		if (priv->notification) {
 			notify_notification_update (priv->notification,



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