From a19a4d507732ed7e4cad8c1560251bd3e395d84a Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Tue, 28 Oct 2008 06:32:56 +0000 Subject: fixed problem that occurs when a resend happens in a packets causing errornous data to enter the engine --- src/engine/client/ec_client.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/engine/client') 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); -- cgit 1.4.1