diff mcabber/mcabber/utils.c @ 1910:3695266e16c7

Fix error presence packet handling. This should also fix the segfault reported by pbd in issue #56.
author Mikael Berthe <mikael@lilotux.net>
date Thu, 13 May 2010 12:26:48 +0200
parents efd7c4c34ff2
children 0ba755e5dc48
line wrap: on
line diff
--- a/mcabber/mcabber/utils.c	Sun Apr 18 14:14:05 2010 +0200
+++ b/mcabber/mcabber/utils.c	Thu May 13 12:26:48 2010 +0200
@@ -65,6 +65,12 @@
   char *ptr;
   char *alias;
 
+  if (!fjid) {
+    scr_LogPrint(LPRINT_LOGNORM, "** jidtodisp: NULL JID, "
+                                 "this is probably a bug, please report!");
+    return NULL;
+  }
+
   alias = g_strdup(fjid);
 
   if ((ptr = strchr(alias, JID_RESOURCE_SEPARATOR)) != NULL) {