From d081955bc37f99f59c61a37f0f848f971943d0c0 Mon Sep 17 00:00:00 2001 From: Emil Sawicki Date: Mon, 31 Jan 2022 17:56:59 +0100 Subject: [PATCH] Fix accessing empty object list --- limereport/objectinspector/lrobjectitemmodel.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/limereport/objectinspector/lrobjectitemmodel.cpp b/limereport/objectinspector/lrobjectitemmodel.cpp index 122a921..c0e5398 100644 --- a/limereport/objectinspector/lrobjectitemmodel.cpp +++ b/limereport/objectinspector/lrobjectitemmodel.cpp @@ -222,6 +222,10 @@ void QObjectPropertyModel::setMultiObjects(QList* list) m_objects.clear(); submit(); + if (list->isEmpty()) { + return; + } + if (!list->contains(m_object)){ m_object=list->at(0); list->removeAt(0);