Linux: Fix window destruction crash.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@449 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2011-12-31 00:57:52 +00:00
parent 8d6c760bbd
commit 3d734d9f90
4 changed files with 17 additions and 24 deletions

View File

@ -786,8 +786,11 @@ void CefBrowserImpl::UIT_DestroyBrowser()
}
// Clean up anything associated with the WebViewHost widget.
UIT_GetWebViewHost()->webwidget()->close();
webviewhost_.reset();
if (webviewhost_.get()) {
if (webviewhost_->webwidget())
webviewhost_->webwidget()->close();
webviewhost_.reset();
}
// Remove the reference to the window handle.
UIT_ClearMainWndHandle();