Skip to content

Commit

Permalink
avoid crash
Browse files Browse the repository at this point in the history
  • Loading branch information
devernay committed Jan 2, 2018
1 parent 9494292 commit 0c0850f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Gui/KnobItemsTableGui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,11 @@ KnobItemsTableView::drawRow(QPainter * painter, const QStyleOptionViewItem & opt

// Draw the label section which is the only one using a regular item and not a KnobGui
KnobTableItemPtr internalItem = found->internalItem.lock();
bool isSelected = internalItem->getModel()->isItemSelected(internalItem);
KnobItemsTablePtr model = internalItem->getModel();
if (!model) {
return;
}
bool isSelected = model->isItemSelected(internalItem);
int labelCol = internalItem->getLabelColumnIndex();
int xOffset = itemRect.x();
{
Expand Down

0 comments on commit 0c0850f

Please sign in to comment.