0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-24 08:34:38 +03:00

Fix accessing empty object list

This commit is contained in:
Emil Sawicki 2022-01-31 17:56:59 +01:00
parent da9c422f74
commit d081955bc3

View File

@ -222,6 +222,10 @@ void QObjectPropertyModel::setMultiObjects(QList<QObject *>* list)
m_objects.clear(); m_objects.clear();
submit(); submit();
if (list->isEmpty()) {
return;
}
if (!list->contains(m_object)){ if (!list->contains(m_object)){
m_object=list->at(0); m_object=list->at(0);
list->removeAt(0); list->removeAt(0);