From 2e651c8fd01a4e9f52a0a35e1b6346a062fafb81 Mon Sep 17 00:00:00 2001 From: Jeff Lenk Date: Sun, 3 Jul 2011 22:35:44 -0500 Subject: [PATCH] FS-3391 --resolve Segmentation fault on mod_dingaling when receiving a discovery from the server --- libs/libdingaling/src/libdingaling.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/libdingaling/src/libdingaling.c b/libs/libdingaling/src/libdingaling.c index 76b19f118f..dbe542dc4a 100644 --- a/libs/libdingaling/src/libdingaling.c +++ b/libs/libdingaling/src/libdingaling.c @@ -607,7 +607,9 @@ static int on_disco_default(void *user_data, ikspak *pak) int all = 0; iks_insert_attrib(iq, "from", handle->login); - iks_insert_attrib(iq, "to", pak->from->full); + if (pak->from) { + iks_insert_attrib(iq, "to", pak->from->full); + } iks_insert_attrib(iq, "id", pak->id); iks_insert_attrib(iq, "type", "result");