summaryrefslogtreecommitdiffstats
path: root/webkit/plugins/npapi
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-24 09:19:48 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-24 09:19:48 +0000
commitc651f6e84393157366c3e9959152960dfcf7398a (patch)
tree8013b0a76a7f5b7ccdd143a94147a77a04e1706b /webkit/plugins/npapi
parente34f2dffbac3677f3e4f88839ad76fb1f8bf5db2 (diff)
downloadchromium_src-c651f6e84393157366c3e9959152960dfcf7398a.zip
chromium_src-c651f6e84393157366c3e9959152960dfcf7398a.tar.gz
chromium_src-c651f6e84393157366c3e9959152960dfcf7398a.tar.bz2
Check for NULL |surface_| in WebPluginDelegateImpl before accessing its context.
BUG=73897 TEST=see bug for manual test Review URL: http://codereview.chromium.org/6575003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75860 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins/npapi')
-rw-r--r--webkit/plugins/npapi/webplugin_delegate_impl_mac.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm b/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm
index 41f41e7..f31004a 100644
--- a/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm
+++ b/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm
@@ -383,7 +383,7 @@ bool WebPluginDelegateImpl::PlatformInitialize() {
// If surface initialization fails for some reason, just continue
// without any drawing; returning false would be a more confusing user
// experience (since it triggers a missing plugin placeholder).
- if (surface_->context()) {
+ if (surface_ && surface_->context()) {
renderer_ = [[CARenderer rendererWithCGLContext:surface_->context()
options:NULL] retain];
[renderer_ setLayer:layer_];