From 1d750c764438009a6de4672d431f9e42e1f9c69c Mon Sep 17 00:00:00 2001
From: Graham McVicker <mcvicker@sanger.ac.uk>
Date: Mon, 12 Jan 2004 17:06:47 +0000
Subject: [PATCH] avoid a perl warning

---
 modules/Bio/EnsEMBL/DBSQL/DensityFeatureAdaptor.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/Bio/EnsEMBL/DBSQL/DensityFeatureAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/DensityFeatureAdaptor.pm
index 46358ee1b1..d0dc81c873 100644
--- a/modules/Bio/EnsEMBL/DBSQL/DensityFeatureAdaptor.pm
+++ b/modules/Bio/EnsEMBL/DBSQL/DensityFeatureAdaptor.pm
@@ -210,7 +210,7 @@ sub fetch_all_by_Slice {
 
     #if we did not completely overlap the last feature, put it back on so
     #it can be partially used by the next block
-    if($fend < $f->{'end'}) {
+    if(defined($f) && (!defined($fend) || $fend < $f->{'end'})) {
       unshift(@features, $f);
     }
 
-- 
GitLab