changeset 7385:79d74929693c

[gaim-migrate @ 7980] I guess this'll fix http://sourceforge.net/tracker/?func=detail&aid=831580&group_id=235&atid=100235 "Can't click link if nothing is inside the A start/end tags" ...for ICQ committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 30 Oct 2003 21:55:29 +0000
parents dc573236dc8b
children 414c701ef1ff
files src/protocols/oscar/oscar.c
diffstat 1 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c	Thu Oct 30 21:19:27 2003 +0000
+++ b/src/protocols/oscar/oscar.c	Thu Oct 30 21:55:29 2003 +0000
@@ -2591,11 +2591,15 @@
 
 		case 0x04: { /* Someone sent you a URL */
 			if (i >= 2) {
-				gchar *uin = g_strdup_printf("%u", args->uin);
-				gchar *message = g_strdup_printf("<A HREF=\"%s\">%s</A>", msg2[1], msg2[0]);
-				serv_got_im(gc, uin, message, 0, time(NULL));
-				g_free(uin);
-				g_free(message);
+				if (msg2[1] != NULL) {
+					gchar *uin = g_strdup_printf("%u", args->uin);
+					gchar *message = g_strdup_printf("<A HREF=\"%s\">%s</A>",
+													 msg2[1],
+													 (msg2[0] && msg2[0][0]) ? msg2[0] : msg2[1]);
+					serv_got_im(gc, uin, message, 0, time(NULL));
+					g_free(uin);
+					g_free(message);
+				}
 			}
 		} break;