changeset 14498:26bca01c7076

[gaim-migrate @ 17217] Fix CID 273 (NULL deref) committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Sun, 10 Sep 2006 15:13:59 +0000
parents ae0f94b7f396
children 67a6716bf4a7
files libgaim/protocols/qq/recv_core.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libgaim/protocols/qq/recv_core.c	Sun Sep 10 15:07:46 2006 +0000
+++ b/libgaim/protocols/qq/recv_core.c	Sun Sep 10 15:13:59 2006 +0000
@@ -296,7 +296,10 @@
 	gint len;
 
 	gc = (GaimConnection *) data;
-	if(gc == NULL || gc->proto_data == NULL || cond != GAIM_INPUT_READ) {
+
+	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
+
+	if(cond != GAIM_INPUT_READ) {
 		gaim_connection_error(gc, _("Socket error"));
 		return;
 	}