Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1115)

Unified Diff: content/browser/devtools/protocol/page_handler.cc

Issue 1419093004: [DevTools] Fix crash in Page.reload when there is no visible entry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nullptr Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/devtools/protocol/devtools_protocol_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/devtools/protocol/page_handler.cc
diff --git a/content/browser/devtools/protocol/page_handler.cc b/content/browser/devtools/protocol/page_handler.cc
index c1e88169d5d9d4dbf8734971433842f5c782986c..73c4c8ea965128b9d683c3b6473413d42916cd8f 100644
--- a/content/browser/devtools/protocol/page_handler.cc
+++ b/content/browser/devtools/protocol/page_handler.cc
@@ -214,7 +214,8 @@ Response PageHandler::Reload(const bool* ignoreCache,
return Response::InternalError("Could not connect to view");
if (web_contents->IsCrashed() ||
- web_contents->GetController().GetVisibleEntry()->IsViewSourceMode()) {
+ (web_contents->GetController().GetVisibleEntry() &&
+ web_contents->GetController().GetVisibleEntry()->IsViewSourceMode())) {
web_contents->GetController().Reload(false);
return Response::OK();
} else {
« no previous file with comments | « content/browser/devtools/protocol/devtools_protocol_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698