aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbderaouf Bencherait <kenshin@collabora.co.uk>2009-06-27 07:38:37 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-06-30 17:15:49 +0800
commit6a1b1c8baf4c30fabd76395e6ff81fd3b7cd621d (patch)
tree16e3d5d40727c79750f797b5ac759acb60c776f5
parentbd2d05811e85a43bc960da36483c315f83e4ac31 (diff)
downloadgsoc2013-empathy-6a1b1c8baf4c30fabd76395e6ff81fd3b7cd621d.tar
gsoc2013-empathy-6a1b1c8baf4c30fabd76395e6ff81fd3b7cd621d.tar.gz
gsoc2013-empathy-6a1b1c8baf4c30fabd76395e6ff81fd3b7cd621d.tar.bz2
gsoc2013-empathy-6a1b1c8baf4c30fabd76395e6ff81fd3b7cd621d.tar.lz
gsoc2013-empathy-6a1b1c8baf4c30fabd76395e6ff81fd3b7cd621d.tar.xz
gsoc2013-empathy-6a1b1c8baf4c30fabd76395e6ff81fd3b7cd621d.tar.zst
gsoc2013-empathy-6a1b1c8baf4c30fabd76395e6ff81fd3b7cd621d.zip
fixed libnotify crashing if icon doesn't exist
-rw-r--r--src/empathy-chat-window.c8
-rw-r--r--src/empathy-status-icon.c4
2 files changed, 9 insertions, 3 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 424d148ac..8e317f603 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -974,11 +974,15 @@ chat_window_show_or_update_notification (EmpathyChatWindow *window,
if (priv->notification != NULL) {
notify_notification_update (priv->notification,
header, escaped, NULL);
- notify_notification_set_icon_from_pixbuf (priv->notification, pixbuf);
+ /* if icon doesn't exist libnotify will crash */
+ if (pixbuf != NULL)
+ notify_notification_set_icon_from_pixbuf (priv->notification, pixbuf);
} else {
priv->notification = notify_notification_new (header, escaped, NULL, NULL);
notify_notification_set_timeout (priv->notification, NOTIFY_EXPIRES_DEFAULT);
- notify_notification_set_icon_from_pixbuf (priv->notification, pixbuf);
+ /* if icon doesn't exist libnotify will crash */
+ if (pixbuf != NULL)
+ notify_notification_set_icon_from_pixbuf (priv->notification, pixbuf);
g_signal_connect (priv->notification, "closed",
G_CALLBACK (chat_window_notification_closed_cb), cb_data);
diff --git a/src/empathy-status-icon.c b/src/empathy-status-icon.c
index d6520ff7c..a4b01b7c0 100644
--- a/src/empathy-status-icon.c
+++ b/src/empathy-status-icon.c
@@ -153,7 +153,9 @@ status_icon_update_notification (EmpathyStatusIcon *icon)
G_CALLBACK (status_icon_notification_closed_cb), icon);
}
- notify_notification_set_icon_from_pixbuf (priv->notification,
+ /* if icon doesn't exist libnotify will crash */
+ if (pixbuf != NULL)
+ notify_notification_set_icon_from_pixbuf (priv->notification,
pixbuf);
notify_notification_show (priv->notification, NULL);