Fix a possible crash in ThingClassesProxy

pull/635/head
Michael Zanetti 2021-08-10 16:29:43 +02:00
parent 83df1b780b
commit 534171db29
1 changed files with 3 additions and 0 deletions

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());
}