Add a g_return_val_if_fail() to avoid crash, and avoid calling that func
with NULL text.
contact_widget_presence_notify_cb (EmpathyContactWidget *information)
{
const gchar *status;
- gchar *markup_text;
+ gchar *markup_text = NULL;
status = empathy_contact_get_status (information->contact);
- markup_text = empathy_add_link_markup (status);
+ if (status != NULL)
+ markup_text = empathy_add_link_markup (status);
gtk_label_set_markup (GTK_LABEL (information->label_status), markup_text);
g_free (markup_text);
};
GString *string;
+ g_return_val_if_fail (text != NULL, NULL);
+
string = g_string_sized_new (strlen (text));
empathy_string_parser_substr (text, -1, parsers, string);