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;