about summary refs log tree commit diff
path: root/src/engine/client/ec_client.c
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2008-10-28 06:32:56 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2008-10-28 06:32:56 +0000
commita19a4d507732ed7e4cad8c1560251bd3e395d84a (patch)
tree3da707bf8e924f6401c58e981f0ae0fcacb058b8 /src/engine/client/ec_client.c
parent36f4b66569ad35006a187159642977451aa11a13 (diff)
downloadzcatch-a19a4d507732ed7e4cad8c1560251bd3e395d84a.tar.gz
zcatch-a19a4d507732ed7e4cad8c1560251bd3e395d84a.zip
fixed problem that occurs when a resend happens in a packets causing errornous data to enter the engine
Diffstat (limited to 'src/engine/client/ec_client.c')
-rw-r--r--src/engine/client/ec_client.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/engine/client/ec_client.c b/src/engine/client/ec_client.c
index ac4b2b81..0b148f45 100644
--- a/src/engine/client/ec_client.c
+++ b/src/engine/client/ec_client.c
@@ -272,6 +272,10 @@ void *snap_find_item(int snapid, int type, int id)
 {
 	/* TODO: linear search. should be fixed. */
 	int i;
+	
+	if(!snapshots[snapid])
+		return 0x0;
+	
 	for(i = 0; i < snapshots[snapid]->snap->num_items; i++)
 	{
 		SNAPSHOT_ITEM *itm = snapshot_get_item(snapshots[snapid]->alt_snap, i);