fix: add memory guard

This commit is contained in:
parker
2025-06-22 16:48:49 +01:00
parent 2b9544cfae
commit 794c9995ca

View File

@@ -224,6 +224,7 @@ void Network::keyPressEvent(QKeyEvent *event)
void Network::highlightEdge(QGraphicsItem* edge, bool state) void Network::highlightEdge(QGraphicsItem* edge, bool state)
{ {
if(!edge) return;
if(state) if(state)
{ {
static_cast<NodeEdgeGraphic*>(edge)->setColor(QColor("red")); static_cast<NodeEdgeGraphic*>(edge)->setColor(QColor("red"));