diff options
author | Christian Strømme <[email protected]> | 2015-05-29 12:23:29 +0200 |
---|---|---|
committer | Christian Stromme <[email protected]> | 2015-06-03 15:13:20 +0000 |
commit | c73251113d96119e5b937f81bbacfbcff2ef94cb (patch) | |
tree | 6dff28ea22fcc38f6bad10a6d319aac7b99fb666 /src/webview/qwebview_android.cpp | |
parent | 9b57e2f1765c0b4db6c3a9edf4277fc784a245f7 (diff) |
Fix crash on destruction of QWebView instances.v5.5.0
The QWebView and QWebViewPrivate class are now in the object tree and
will therefore be delete once their parent is destroyed.
This change removes the QScopedPointers that used to manage the
lifetime of the webview instances.
Task-number: QTBUG-46286
Change-Id: I2d7f12b317770113e5b35c14b60df7442aa3e68e
Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
Diffstat (limited to 'src/webview/qwebview_android.cpp')
-rw-r--r-- | src/webview/qwebview_android.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/webview/qwebview_android.cpp b/src/webview/qwebview_android.cpp index 76e7288..be5ab6d 100644 --- a/src/webview/qwebview_android.cpp +++ b/src/webview/qwebview_android.cpp @@ -128,7 +128,8 @@ QAndroidWebViewPrivate::QAndroidWebViewPrivate(QObject *p) QAndroidWebViewPrivate::~QAndroidWebViewPrivate() { g_webViews->take(m_id); - delete m_window; + if (m_window != 0 && m_window->parent() == 0) + delete m_window; } QUrl QAndroidWebViewPrivate::url() const |