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(); d_ptr->EditorWidgets.clear();
if (layout()) if (layout())
{ {
QLayoutItem *child = layout()->takeAt(0); QLayoutItem *child;
while (layout()->count() > 0 && child != nullptr) while (layout()->count() > 0 && (child = layout()->takeAt(0)) != nullptr)
{ {
if (child->widget()) if (child->widget())
{ {