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

preferencesAboutTextFull
Clément Fauconnier 3 years ago
parent a76d0d85c1
commit ba1bef4ab3
  1. 9
      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());
itemDelegate->createControls(); if (itemDelegate)
selItems.first()->setVisible(true); {
itemDelegate->showControls(); itemDelegate->createControls();
selItems.first()->setVisible(true);
itemDelegate->showControls();
}
} break; } break;
default: { default: {

Loading…
Cancel
Save