diff options
Diffstat (limited to 'src/Patchage.cpp')
-rw-r--r-- | src/Patchage.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Patchage.cpp b/src/Patchage.cpp index 86d5dbf..7d10abf 100644 --- a/src/Patchage.cpp +++ b/src/Patchage.cpp @@ -639,9 +639,11 @@ update_edge_color(GanvEdge* edge, void* data) auto* patchage = static_cast<Patchage*>(data); Ganv::Edge* edgemm = Glib::wrap(edge); - auto* tail = dynamic_cast<CanvasPort*>((edgemm)->get_tail()); - if (tail) { - edgemm->set_color(patchage->conf().get_port_color(tail->type())); + if (edgemm) { + auto* tail = dynamic_cast<CanvasPort*>((edgemm)->get_tail()); + if (tail) { + edgemm->set_color(patchage->conf().get_port_color(tail->type())); + } } } |