Fix Valentina crash.

The crash appeared after wrong refactoring.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-09-15 09:25:19 +03:00
parent d836c61fa2
commit cc01fdf2d2

View file

@ -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())
{