diff libgaim/protocols/qq/recv_core.c @ 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 902c3aa4950a
children 6b8bc59414f0
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;
 	}