diff --git a/src/libs/vtools/dialogs/tools/dialogseamallowance.cpp b/src/libs/vtools/dialogs/tools/dialogseamallowance.cpp index df1e38ac3..01924a406 100644 --- a/src/libs/vtools/dialogs/tools/dialogseamallowance.cpp +++ b/src/libs/vtools/dialogs/tools/dialogseamallowance.cpp @@ -629,7 +629,7 @@ void DialogSeamAllowance::ShowPinsContextMenu(const QPoint &pos) return; } - QMenu *menu = new QMenu(this); + QScopedPointer menu(new QMenu()); QAction *actionDelete = menu->addAction(QIcon::fromTheme("edit-delete"), tr("Delete")); QAction *selectedAction = menu->exec(ui->listWidgetPins->viewport()->mapToGlobal(pos));