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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 331633004: Check for NULL after Frame lookup in findFrameByName (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Improved the conditional Created 6 years, 6 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index c60757b86f7d6b1a778b03c8b206ae65457884ed..c7de4f34b14099515ead0d62abf2517409f9ffd2 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -2490,7 +2490,7 @@ WebFrame* WebViewImpl::findFrameByName(
relativeToFrame = mainFrame();
Frame* frame = toWebLocalFrameImpl(relativeToFrame)->frame();
frame = frame->tree().find(name);
- if (!frame->isLocalFrame())
+ if (!frame || !frame->isLocalFrame())
return 0;
return WebLocalFrameImpl::fromFrame(toLocalFrame(frame));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698