Skip to content

Commit

Permalink
ticket:4091
Browse files Browse the repository at this point in the history
Check if object is 0.
  • Loading branch information
adeas31 committed Oct 26, 2016
1 parent 755ceb7 commit c12584a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OMEdit/OMEditGUI/Modeling/LibraryTreeWidget.cpp
Expand Up @@ -124,7 +124,7 @@ void ItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
if (pLibraryTreeProxyModel) {
QModelIndex sourceIndex = pLibraryTreeProxyModel->mapToSource(index);
LibraryTreeItem *pLibraryTreeItem = static_cast<LibraryTreeItem*>(sourceIndex.internalPointer());
if (!pLibraryTreeItem->isSaved()) {
if (pLibraryTreeItem && !pLibraryTreeItem->isSaved()) {
opt.palette.setBrush(QPalette::Highlight, Qt::darkRed);
}
}
Expand Down

0 comments on commit c12584a

Please sign in to comment.