diff --git a/modules/Bio/EnsEMBL/DBSQL/CoordSystemAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/CoordSystemAdaptor.pm index ec4643b58855eafdd84b4aef5e34a2a03714259f..a9c4b5fa39f1d9eb9ba967f583df673970e7fb3e 100644 --- a/modules/Bio/EnsEMBL/DBSQL/CoordSystemAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/CoordSystemAdaptor.pm @@ -665,6 +665,12 @@ sub get_mapping_path { my $cs1 = shift; my $cs2 = shift; + if(!ref($cs1) || !ref($cs2) || + !$cs1->isa('Bio::EnsEMBL::CoordSystem') || + !$cs2->isa('Bio::EnsEMBL::CoordSystem')) { + throw('Two Bio::EnsEMBL::CoordSystem arguments expected.'); + } + my $key1 = $cs1->name() . ":" . $cs1->version(); my $key2 = $cs2->name() . ":" . $cs2->version();