The WebPluginImpl::paint function can be invoked when the delegate_ member is NULL. This scenario can happen if a plugin is reinitialized, in which case the plugin instance is torn down and a new one is initialized. If the second initialization fails, we have a plugin instance in the renderer which has a NULL delegate_.
The WebPluginImpl::paint function can be invoked when the delegate_ member is NULL. This scenario
can happen if a plugin is reinitialized, in which case the plugin instance is torn down and a new one
is initialized. If the second initialization fails, we have a plugin instance in the renderer which has
a NULL delegate_.

Fix is to add a NULL check for the delegate in the paint function.

Fixes http://code.google.com/p/chromium/issues/detail?id=22196

Bug=22196

Review URL: http://codereview.chromium.org/215018

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@26552 0039d316-1c4b-4281-b951-d872f2087c98

adobe/chromium,ropik/chromium,gavinp/chromium,ropik/chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,ropik/chromium,yitian134/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,adobe/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,yitian134/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,gavinp/chromium,ropik/chromium,yitian134/chromium,gavinp/chromium,ropik/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,ropik/chromium,yitian134/chromium,adobe/chromium,ropik/chromium,gavinp/chromium,ropik/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,adobe/chromium