changeset 20862:9bdc5144bd96

Fix CID 340; potential NULL deref.
author Daniel Atallah <daniel.atallah@gmail.com>
date Wed, 10 Oct 2007 00:44:34 +0000
parents 9c2ec10933b2
children 27d2d6cc8d36
files libpurple/protocols/oscar/oscar.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/oscar/oscar.c	Wed Oct 10 00:08:54 2007 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Wed Oct 10 00:44:34 2007 +0000
@@ -1128,8 +1128,10 @@
 	aim_clientready(od, conn);
 
 	chatcon = find_oscar_chat_by_conn(gc, conn);
-	chatcon->id = id;
-	chatcon->conv = serv_got_joined_chat(gc, id++, chatcon->show);
+	if (chatcon) {
+		chatcon->id = id;
+		chatcon->conv = serv_got_joined_chat(gc, id++, chatcon->show);
+	}
 }
 
 static void