From 92e6a35a800a5417d3eef10874eb2f49e2b9709c Mon Sep 17 00:00:00 2001 From: Tobias Koenig Date: Mon, 17 Dec 2007 17:21:34 +0000 Subject: [PATCH] Reset the d->failureText to 0 at that point, as the qDeleteAll below will first delete the d->failureText object and than trigger a relayout which will access the invalid d->failureText in Applet::contentSize(). => No crash anymore svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=749708 --- applet.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applet.cpp b/applet.cpp index da4df013c..e1ac1ffe7 100644 --- a/applet.cpp +++ b/applet.cpp @@ -672,6 +672,8 @@ void Applet::setFailedToLaunch(bool failed, const QString& reason) d->failed = failed; prepareGeometryChange(); + + d->failureText = 0; qDeleteAll(QGraphicsItem::children()); delete layout(); @@ -690,8 +692,6 @@ void Applet::setFailedToLaunch(bool failed, const QString& reason) .brush(QPalette::Normal).color()); failureLayout->addItem(d->failureText); setGeometry(QRectF(geometry().topLeft(), d->failureText->sizeHint())); - } else { - d->failureText = 0; } update();