ut_expand_tabs: Check the argument is not null
authorMikael Berthe <mikael@lilotux.net>
Wed, 28 Nov 2012 17:50:25 +0100
changeset 2049 0ba755e5dc48
parent 2048 349e3c3eb874
child 2050 998feaa54ef0
ut_expand_tabs: Check the argument is not null It should never happen, but you never know...
mcabber/mcabber/utils.c
--- a/mcabber/mcabber/utils.c	Tue Nov 27 19:49:50 2012 +0100
+++ b/mcabber/mcabber/utils.c	Wed Nov 28 17:50:25 2012 +0100
@@ -676,6 +676,9 @@
   char *p, *q;
   guint n = 0, bc = 0;
 
+  if (!text)
+    return NULL;
+
   xtext = (char*)text;
   for (p=xtext; *p; p++)
     if (*p == '\t')