diff options
Diffstat (limited to 'src/engine/client/ec_client.c')
| -rw-r--r-- | src/engine/client/ec_client.c | 4 |
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); |