Skip to content

Commit

Permalink
Check for NULL pointer when trying to access inherited class.
Browse files Browse the repository at this point in the history
  • Loading branch information
adeas31 committed Jul 12, 2017
1 parent fbc5346 commit 4d60cd3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions OMEdit/OMEditGUI/Component/Component.cpp
Expand Up @@ -1733,6 +1733,9 @@ QString Component::getParameterDisplayStringFromExtendsParameters(QString parame
QString typeName = "";
foreach (Component *pInheritedComponent, mInheritedComponentsList) {
if (pInheritedComponent->getLibraryTreeItem()) {
if (!pInheritedComponent->getLibraryTreeItem()->getModelWidget()) {
MainWindow::instance()->getLibraryWidget()->getLibraryTreeModel()->showModelWidget(pInheritedComponent->getLibraryTreeItem(), false);
}
pInheritedComponent->getLibraryTreeItem()->getModelWidget()->loadDiagramView();
foreach (Component *pComponent, pInheritedComponent->getLibraryTreeItem()->getModelWidget()->getDiagramGraphicsView()->getComponentsList()) {
if (pComponent->getComponentInfo()->getName().compare(parameterName) == 0) {
Expand Down

0 comments on commit 4d60cd3

Please sign in to comment.