From 3724878043a90a1f4cb2a6816c82146b5bc0d48c Mon Sep 17 00:00:00 2001 From: Knud Dollereder Date: Fri, 18 Dec 2020 16:25:02 +0100 Subject: [PATCH] Prevent access of invalid parent properties when retrieving the parent ids of a ModelNode Change-Id: Ic754786e2bd3744b7a4bd67b9db385be368e5925 Reviewed-by: Tim Jenssen --- .../qmldesigner/components/curveeditor/curveeditormodel.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/qmldesigner/components/curveeditor/curveeditormodel.cpp b/src/plugins/qmldesigner/components/curveeditor/curveeditormodel.cpp index 7827cf03c0f..8b0a0357b1c 100644 --- a/src/plugins/qmldesigner/components/curveeditor/curveeditormodel.cpp +++ b/src/plugins/qmldesigner/components/curveeditor/curveeditormodel.cpp @@ -225,6 +225,9 @@ PropertyTreeItem::ValueType typeFrom(const QmlDesigner::QmlTimelineKeyframeGroup std::vector parentIds(const QmlDesigner::ModelNode &node) { + if (!node.hasParentProperty()) + return {}; + std::vector out; QmlDesigner::ModelNode parent = node.parentProperty().parentModelNode();