From 35fdbeca26f94ac562852cf78e3314b9e35aa5d9 Mon Sep 17 00:00:00 2001 From: Pablo Alvarez Lopez Date: Mon, 19 Aug 2024 12:00:16 +0200 Subject: [PATCH] Fixed the same problem in GNEContainers. Refs #12 --- src/netedit/elements/demand/GNEContainer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/netedit/elements/demand/GNEContainer.cpp b/src/netedit/elements/demand/GNEContainer.cpp index 28d5ec79b8eb..4f898e756e16 100644 --- a/src/netedit/elements/demand/GNEContainer.cpp +++ b/src/netedit/elements/demand/GNEContainer.cpp @@ -187,7 +187,7 @@ GNEContainer::getMoveOperation() { // check first container plan if (getChildDemandElements().front()->getTagProperty().isPlanStopContainer()) { return nullptr; - } else { + } else if (getChildDemandElements().front()->getParentEdges().size() > 0) { // get lane const GNELane* lane = getChildDemandElements().front()->getParentEdges().front()->getLaneByAllowedVClass(getVClass()); // declare departPos @@ -197,6 +197,8 @@ GNEContainer::getMoveOperation() { } // return move operation return new GNEMoveOperation(this, lane, posOverLane, false); + } else { + return nullptr; } }