summaryrefslogtreecommitdiffstats
path: root/webkit/plugins
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-16 21:51:09 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-16 21:51:09 +0000
commit82244f22e24578d285ff20d4c83c17308a3dc2b5 (patch)
tree66dbbb3beeedde8fb6509af7bcc2883a6c6550d4 /webkit/plugins
parent354a1428398e481c8596506dd4807ce3cb459cf0 (diff)
downloadchromium_src-82244f22e24578d285ff20d4c83c17308a3dc2b5.zip
chromium_src-82244f22e24578d285ff20d4c83c17308a3dc2b5.tar.gz
chromium_src-82244f22e24578d285ff20d4c83c17308a3dc2b5.tar.bz2
webkit: Check that delegate_ isn't NULL before trying to updateGeometry.
It appears that paint() checks for non-NULL delegate_, so it makes sense to do the same for updateGeometry as well. BUG=155950 Review URL: https://codereview.chromium.org/11148031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162262 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins')
-rw-r--r--webkit/plugins/npapi/webplugin_impl.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/webkit/plugins/npapi/webplugin_impl.cc b/webkit/plugins/npapi/webplugin_impl.cc
index a8b9672..702e373 100644
--- a/webkit/plugins/npapi/webplugin_impl.cc
+++ b/webkit/plugins/npapi/webplugin_impl.cc
@@ -347,9 +347,9 @@ void WebPluginImpl::updateGeometry(
}
// Only UpdateGeometry if either the window or clip rects have changed.
- if (first_geometry_update_ ||
+ if (delegate_ && (first_geometry_update_ ||
new_geometry.window_rect != geometry_.window_rect ||
- new_geometry.clip_rect != geometry_.clip_rect) {
+ new_geometry.clip_rect != geometry_.clip_rect)) {
// Notify the plugin that its parameters have changed.
delegate_->UpdateGeometry(new_geometry.window_rect, new_geometry.clip_rect);
}