1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-06-25 02:19:37 +02:00

Fix: NULL pointer dereference for Dummy interface

Right clicking on the Dummy interface in the object tree will dereference a null pointer.
This commit is contained in:
Sirius Bakke
2014-01-06 12:38:52 +01:00
parent 9b1aaaa89e
commit 9c88cad56d

View File

@@ -834,9 +834,11 @@ void ObjectManipulator::contextMenuRequested(const QPoint &pos)
{
popup_menu->addSeparator();
FWObject *h = Host::getParentHost(currentObj);
list<FWObject*> top_level_interfaces = h->getByType(Interface::TYPENAME);
top_level_interfaces.sort(FWObjectNameCmpPredicate());
addSubinterfaceSubmenu(popup_menu, top_level_interfaces);
if (h != NULL) {
list<FWObject*> top_level_interfaces = h->getByType(Interface::TYPENAME);
top_level_interfaces.sort(FWObjectNameCmpPredicate());
addSubinterfaceSubmenu(popup_menu, top_level_interfaces);
}
}
popup_menu->addSeparator();