Merge PR #635: Fix a possible crash in ThingClassesProxy

This commit is contained in:
Jenkins nymea 2021-08-10 23:18:05 +02:00
commit 8e23b10314

View File

@ -176,6 +176,9 @@ void ThingClassesProxy::setGroupByInterface(bool groupByInterface)
ThingClass *ThingClassesProxy::get(int index) const
{
if (!m_engine) {
return nullptr;
}
return m_engine->thingManager()->thingClasses()->get(mapToSource(this->index(index, 0)).row());
}