From 2fc960f4553923a5f473cdd00e91c5efa45a1490 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Fri, 14 Nov 2008 08:04:23 +0000 Subject: [PATCH] disconnect if the page changes but we don't own it svn path=/trunk/KDE/kdelibs/; revision=884087 --- widgets/webview.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/widgets/webview.cpp b/widgets/webview.cpp index 9d5f1431c..11ab7b14d 100644 --- a/widgets/webview.cpp +++ b/widgets/webview.cpp @@ -103,8 +103,12 @@ void WebView::setPage(QWebPage *page) return; } - if (d->page && d->page->parent() == this) { - delete d->page; + if (d->page) { + if (d->page->parent() == this) { + delete d->page; + } else { + disconnect(d->page, 0, this, 0); + } } d->page = page;