From d3c5f72bab4de4a782d8c33bb89b94d2a94b712e Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Mon, 3 Dec 2007 16:11:27 +0000 Subject: [PATCH] fix possible crash CCMAIL:slashdevdsp@gmail.com svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=744440 --- layouts/freelayout.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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); }