Fix a possible crash in ThingClassesProxy
This commit is contained in:
parent
83df1b780b
commit
534171db29
@ -176,6 +176,9 @@ void ThingClassesProxy::setGroupByInterface(bool groupByInterface)
|
|||||||
|
|
||||||
ThingClass *ThingClassesProxy::get(int index) const
|
ThingClass *ThingClassesProxy::get(int index) const
|
||||||
{
|
{
|
||||||
|
if (!m_engine) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
return m_engine->thingManager()->thingClasses()->get(mapToSource(this->index(index, 0)).row());
|
return m_engine->thingManager()->thingClasses()->get(mapToSource(this->index(index, 0)).row());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user