aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-event-manager.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-04-04 16:23:53 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-06-30 16:50:04 +0800
commit19cbd39e5eb916ecc4dc2f0705a204d0c7ca6e3a (patch)
tree266eaf20a1561722080600c98ecd6fbafe0b6945 /src/empathy-event-manager.c
parent1b79d18321b2d1bcbc8da81f5572de90c851a87e (diff)
downloadgsoc2013-empathy-19cbd39e5eb916ecc4dc2f0705a204d0c7ca6e3a.tar
gsoc2013-empathy-19cbd39e5eb916ecc4dc2f0705a204d0c7ca6e3a.tar.gz
gsoc2013-empathy-19cbd39e5eb916ecc4dc2f0705a204d0c7ca6e3a.tar.bz2
gsoc2013-empathy-19cbd39e5eb916ecc4dc2f0705a204d0c7ca6e3a.tar.lz
gsoc2013-empathy-19cbd39e5eb916ecc4dc2f0705a204d0c7ca6e3a.tar.xz
gsoc2013-empathy-19cbd39e5eb916ecc4dc2f0705a204d0c7ca6e3a.tar.zst
gsoc2013-empathy-19cbd39e5eb916ecc4dc2f0705a204d0c7ca6e3a.zip
event_manager_add: don't crash if approval is NULL (#646555)
When adding a "subscription request" event there is no EventManagerApproval associated with the event.
Diffstat (limited to 'src/empathy-event-manager.c')
-rw-r--r--src/empathy-event-manager.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c
index dbb95cda9..27f8a0bdb 100644
--- a/src/empathy-event-manager.c
+++ b/src/empathy-event-manager.c
@@ -237,7 +237,8 @@ event_manager_add (EmpathyEventManager *manager,
event->public.header = g_strdup (header);
event->public.message = g_strdup (message);
event->public.must_ack = (func != NULL);
- event->public.handler_instance = approval->handler_instance;
+ if (approval != NULL)
+ event->public.handler_instance = approval->handler_instance;
event->inhibit = FALSE;
event->func = func;
event->user_data = user_data;