X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FText%2FTradition%2FCollation%2FRelationshipStore.pm;h=de125331a6ccd61e0b70bb443dcb38c90daa9e7e;hb=a30ca502de98d06d416f352736ae855185eabb86;hp=dc2fe1b2245a96e9ec93e0aeae04033d80e483a8;hpb=d6936deaa42cead642f7e4f3dc1a4e9c01fb8027;p=scpubgit%2Fstemmatology.git diff --git a/lib/Text/Tradition/Collation/RelationshipStore.pm b/lib/Text/Tradition/Collation/RelationshipStore.pm index dc2fe1b..de12533 100644 --- a/lib/Text/Tradition/Collation/RelationshipStore.pm +++ b/lib/Text/Tradition/Collation/RelationshipStore.pm @@ -537,6 +537,7 @@ sub _as_graphml { my $edge_ctr = 0; foreach my $e ( sort { $a->[0] cmp $b->[0] } $self->graph->edges ) { # Add an edge and fill in its relationship info. + next unless( exists $node_hash->{$e->[0]} && exists $node_hash->{$e->[1]} ); my $edge_el = $rgraph->addNewChild( $graphml_ns, 'edge' ); $edge_el->setAttribute( 'source', $node_hash->{$e->[0]} ); $edge_el->setAttribute( 'target', $node_hash->{$e->[1]} );