pidgin: 3311c78a: Avoid calling purple_str_sub_away_format...
evands at pidgin.im
evands at pidgin.im
Mon Jun 9 14:10:47 EDT 2008
-----------------------------------------------------------------
Revision: 3311c78aec832cc7153f99b528561ad66d2fe6fc
Ancestor: af4f5e6bd5deaab90311233bff1bf099f27e2bc9
Author: evands at pidgin.im
Date: 2008-06-09T18:04:13
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/3311c78aec832cc7153f99b528561ad66d2fe6fc
Modified files:
libpurple/protocols/oscar/oscar.c
ChangeLog:
Avoid calling purple_str_sub_away_formatters() and g_markup_escape_text()
with NULL strings.
-------------- next part --------------
============================================================
--- libpurple/protocols/oscar/oscar.c 71e09c3ab31efa32899aa3a00d4c07b7920758af
+++ libpurple/protocols/oscar/oscar.c d6bb1da4537b057aca8a707287684cbe87929497
@@ -844,7 +844,7 @@ static void oscar_user_info_append_statu
/* Away messges are HTML, but available messages were originally plain text.
* We therefore need to strip away messages but not available messages if we're asked to remove HTML tags.
*/
- if (is_away) {
+ if (is_away && message) {
gchar *tmp2;
tmp = purple_markup_strip_html(message);
g_free(message);
@@ -854,16 +854,16 @@ static void oscar_user_info_append_statu
}
} else {
- if (itmsurl) {
- tmp = g_strdup_printf("<a href=\"%s\">%s</a>",
- itmsurl, message);
- g_free(itmsurl);
- g_free(message);
- message = tmp;
+ if (itmsurl) {
+ tmp = g_strdup_printf("<a href=\"%s\">%s</a>",
+ itmsurl, message);
+ g_free(itmsurl);
+ g_free(message);
+ message = tmp;
+ }
}
- }
- if (is_away) {
+ if (is_away && message) {
tmp = purple_str_sub_away_formatters(message, purple_account_get_username(account));
g_free(message);
message = tmp;
More information about the Commits
mailing list