Skip to content

Commit

Permalink
Fixes ticket:6234 check if the ModelWidget is NULL (#6974)
Browse files Browse the repository at this point in the history
  • Loading branch information
adeas31 committed Nov 23, 2020
1 parent d8931f2 commit 0b558b5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion OMEdit/OMEditLIB/Modeling/ModelWidgetContainer.cpp
Expand Up @@ -7318,7 +7318,9 @@ void ModelWidget::associateBusWithConnectors(Element *pBusComponent, GraphicsVie
void ModelWidget::removeInheritedClasses(LibraryTreeItem *pLibraryTreeItem)
{
pLibraryTreeItem->removeInheritedClasses();
pLibraryTreeItem->getModelWidget()->clearInheritedClasses();
if (pLibraryTreeItem->getModelWidget()) {
pLibraryTreeItem->getModelWidget()->clearInheritedClasses();
}
foreach (LibraryTreeItem *pChildLibraryTreeItem, pLibraryTreeItem->childrenItems()) {
if (pChildLibraryTreeItem && pChildLibraryTreeItem->isInPackageOneFile()) {
ModelWidget::removeInheritedClasses(pChildLibraryTreeItem);
Expand Down

0 comments on commit 0b558b5

Please sign in to comment.