From 0ef92f9cba16bd5cc40c2057dcdd644844368648 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 31 Oct 2017 20:01:19 +0200 Subject: [PATCH] Fixed Valentina crash. Valentina crashes if creating tool was canceled. --HG-- branch : develop --- src/app/valentina/mainwindow.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index 49990325b..8628af8f3 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -720,7 +720,10 @@ void MainWindow::ClosedDialogWithApply(int result, VMainGraphicsScene *scene) } ArrowTool(true); ui->view->itemClicked(vtool);// Don't check for nullptr here - vtool->setFocus(); + if (vtool) + { + vtool->setFocus(); + } // If insert not to the end of file call lite parse if (doc->getCursor() > 0) {