(should not happen but) prevent segfault if itemDelegate is null

preferencesAboutTextFull
Clément Fauconnier 3 years ago
parent a76d0d85c1
commit ba1bef4ab3
  1. 3
      src/domain/UBGraphicsScene.cpp

@ -1335,9 +1335,12 @@ void UBGraphicsScene::updateSelectionFrame()
mSelectionFrame->setEnclosedItems(QList<QGraphicsItem*>()); mSelectionFrame->setEnclosedItems(QList<QGraphicsItem*>());
UBGraphicsItemDelegate *itemDelegate = UBGraphicsItem::Delegate(selItems.first()); UBGraphicsItemDelegate *itemDelegate = UBGraphicsItem::Delegate(selItems.first());
if (itemDelegate)
{
itemDelegate->createControls(); itemDelegate->createControls();
selItems.first()->setVisible(true); selItems.first()->setVisible(true);
itemDelegate->showControls(); itemDelegate->showControls();
}
} break; } break;
default: { default: {

Loading…
Cancel
Save