diff --git a/modules/Bio/EnsEMBL/DBSQL/GeneAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/GeneAdaptor.pm index b1feb498169e80cd591ba9ce2b6685a954f306a2..1f342bad4dd823b5925cfa1d6c31ec9300d581ff 100644 --- a/modules/Bio/EnsEMBL/DBSQL/GeneAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/GeneAdaptor.pm @@ -172,6 +172,7 @@ sub fetch_by_stable_id { $sth->execute($id); my ($dbID) = $sth->fetchrow_array(); + $sth->finish; return undef if(!$dbID);