From 19cbd39e5eb916ecc4dc2f0705a204d0c7ca6e3a Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 4 Apr 2011 10:23:53 +0200 Subject: 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. --- src/empathy-event-manager.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3