Skip to content

Commit 8d5ee7e

Browse files
author
Tom Manner
committed
Added segfault protection for edge in Relationship::disconnector.
1 parent 183e382 commit 8d5ee7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/relationship.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class Relationship {
8484
void operator()(DiGraph* digraph, tail_t* tail, head_t* head) {
8585
if (tail and head) {
8686
Edge<tail_t, head_t>* edge = tail->Relationship<tail_t, head_t>::getOutgoingEdge();
87-
if (edge->getHead() == head) {
87+
if (edge and edge->getHead() == head) {
8888
tail->Relationship<tail_t, head_t>::disconnect(edge);
8989
tail->removeEdge(edge);
9090
head->Relationship<tail_t, head_t>::disconnect(edge);

0 commit comments

Comments
 (0)