summaryrefslogtreecommitdiffstats
path: root/extensions/browser/app_window
diff options
context:
space:
mode:
authordtseng <dtseng@chromium.org>2016-02-10 13:28:25 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-10 21:30:38 +0000
commitc607f296b375457f194847f97152b8aff55a2647 (patch)
tree60050125f407f4e94a8c76c5565fec0e2083917a /extensions/browser/app_window
parent655530d81ebe07e4f52303b3863bf586f9d0cd4f (diff)
downloadchromium_src-c607f296b375457f194847f97152b8aff55a2647.zip
chromium_src-c607f296b375457f194847f97152b8aff55a2647.tar.gz
chromium_src-c607f296b375457f194847f97152b8aff55a2647.tar.bz2
Fix AppWindow access to uninitialized AppWindowContents.
TEST=reproduction in bug no longer occurs. BUG=576607 Review URL: https://codereview.chromium.org/1668973002 Cr-Commit-Position: refs/heads/master@{#374728}
Diffstat (limited to 'extensions/browser/app_window')
-rw-r--r--extensions/browser/app_window/app_window.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/extensions/browser/app_window/app_window.cc b/extensions/browser/app_window/app_window.cc
index e328ecf..5bb73e6 100644
--- a/extensions/browser/app_window/app_window.cc
+++ b/extensions/browser/app_window/app_window.cc
@@ -520,7 +520,9 @@ void AppWindow::OnNativeWindowActivated() {
}
content::WebContents* AppWindow::web_contents() const {
- return app_window_contents_->GetWebContents();
+ if (app_window_contents_)
+ return app_window_contents_->GetWebContents();
+ return nullptr;
}
const Extension* AppWindow::GetExtension() const {