From 07be09c5773d71b673c5f1b80ebb0ca07a23c726 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Wed, 21 Aug 2019 17:36:59 +0300 Subject: [PATCH] Fix crash if tool is not ready yet. --HG-- branch : develop --- src/app/valentina/dialogs/vwidgetdetails.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/valentina/dialogs/vwidgetdetails.cpp b/src/app/valentina/dialogs/vwidgetdetails.cpp index 84dbefd55..54429d240 100644 --- a/src/app/valentina/dialogs/vwidgetdetails.cpp +++ b/src/app/valentina/dialogs/vwidgetdetails.cpp @@ -202,13 +202,12 @@ void VWidgetDetails::ToggledPieceItem(QTableWidgetItem *item) try { tool = qobject_cast(VAbstractPattern::getTool(id)); + tool->setVisible(ui->checkBoxHideNotInLayout->isChecked() ? inLayout : true); } catch (VExceptionBadId &) { // do nothing } - - tool->setVisible(ui->checkBoxHideNotInLayout->isChecked() ? inLayout : true); } }