comparison libpurple/util.c @ 20969:17ee8c81c99b

Only free the GString "alt" if it's non-null. This was causing an assertion failure when either sending or receiving a direct IM (or maybe both) with HTML logging on (and maybe other types of logging--I didn't check). Fixes #3514
author Mark Doliner <mark@kingant.net>
date Tue, 16 Oct 2007 07:31:41 +0000
parents 4a8366502f01
children 89c7be36fd61
comparison
equal deleted inserted replaced
20968:d59fb44a0617 20969:17ee8c81c99b
1513 if(alt) { 1513 if(alt) {
1514 if(plain) 1514 if(plain)
1515 plain = g_string_append(plain, alt->str); 1515 plain = g_string_append(plain, alt->str);
1516 if(!src && xhtml) 1516 if(!src && xhtml)
1517 xhtml = g_string_append(xhtml, alt->str); 1517 xhtml = g_string_append(xhtml, alt->str);
1518 g_string_free(alt, TRUE);
1518 } 1519 }
1519 g_string_free(alt, TRUE);
1520 g_string_free(src, TRUE); 1520 g_string_free(src, TRUE);
1521 continue; 1521 continue;
1522 } 1522 }
1523 if(!g_ascii_strncasecmp(c, "<a", 2) && (*(c+2) == '>' || *(c+2) == ' ')) { 1523 if(!g_ascii_strncasecmp(c, "<a", 2) && (*(c+2) == '>' || *(c+2) == ' ')) {
1524 const char *p = c; 1524 const char *p = c;