diff --git a/layouts/freelayout.cpp b/layouts/freelayout.cpp index 8f9ce02dc..14a0dab99 100644 --- a/layouts/freelayout.cpp +++ b/layouts/freelayout.cpp @@ -61,6 +61,10 @@ void FreeLayout::addItem(LayoutItem *item) void FreeLayout::removeItem(LayoutItem *item) { + if (!item) { + return; + } + d->children.removeAll(item); item->unsetManagingLayout(this); }