| Index: chrome/plugin/webplugin_proxy.cc
|
| diff --git a/chrome/plugin/webplugin_proxy.cc b/chrome/plugin/webplugin_proxy.cc
|
| index 0e2e006f47760656b78ad1734fcc6e62b08ca8d0..8a046502687fb86360455103d28ca932da30d0b5 100644
|
| --- a/chrome/plugin/webplugin_proxy.cc
|
| +++ b/chrome/plugin/webplugin_proxy.cc
|
| @@ -636,7 +636,13 @@ void WebPluginProxy::SetWindowlessBuffer(
|
| int width = delegate_->GetRect().width();
|
| int height = delegate_->GetRect().height();
|
| windowless_dib_.reset(TransportDIB::Map(windowless_buffer));
|
| - windowless_canvas_.reset(windowless_dib_->GetPlatformCanvas(width, height));
|
| + if (windowless_dib_.get()) {
|
| + windowless_canvas_.reset(windowless_dib_->GetPlatformCanvas(width, height));
|
| + } else {
|
| + // This can happen if the renderer has already destroyed the TransportDIB
|
| + // by the time we receive the handle, e.g. in case of multiple resizes.
|
| + windowless_canvas_.reset();
|
| + }
|
| background_dib_.reset(TransportDIB::Map(background_buffer));
|
| if (background_dib_.get()) {
|
| background_canvas_.reset(background_dib_->GetPlatformCanvas(width, height));
|
|
|