From cc01fdf2d232deb332209fbe72b4ee60e14c3da0 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Fri, 15 Sep 2017 09:25:19 +0300 Subject: [PATCH] Fix Valentina crash. The crash appeared after wrong refactoring. --HG-- branch : develop --- src/libs/vpropertyexplorer/vpropertyformwidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/vpropertyexplorer/vpropertyformwidget.cpp b/src/libs/vpropertyexplorer/vpropertyformwidget.cpp index 3a9a6d9ca..2d0744953 100644 --- a/src/libs/vpropertyexplorer/vpropertyformwidget.cpp +++ b/src/libs/vpropertyexplorer/vpropertyformwidget.cpp @@ -78,8 +78,8 @@ void VPE::VPropertyFormWidget::build() d_ptr->EditorWidgets.clear(); if (layout()) { - QLayoutItem *child = layout()->takeAt(0); - while (layout()->count() > 0 && child != nullptr) + QLayoutItem *child; + while (layout()->count() > 0 && (child = layout()->takeAt(0)) != nullptr) { if (child->widget()) {