| Index: content/renderer/pepper/ppb_graphics_3d_impl.cc
|
| diff --git a/content/renderer/pepper/ppb_graphics_3d_impl.cc b/content/renderer/pepper/ppb_graphics_3d_impl.cc
|
| index 691f524497ad9cc53dd90b6dff80e2ea31878c10..24c6513c12fb8119bb4d5ef6293d885dcc83d5e9 100644
|
| --- a/content/renderer/pepper/ppb_graphics_3d_impl.cc
|
| +++ b/content/renderer/pepper/ppb_graphics_3d_impl.cc
|
| @@ -46,7 +46,10 @@ PPB_Graphics3D_Impl::PPB_Graphics3D_Impl(PP_Instance instance)
|
| weak_ptr_factory_(this) {}
|
|
|
| PPB_Graphics3D_Impl::~PPB_Graphics3D_Impl() {
|
| - command_buffer_->SetGpuControlClient(nullptr);
|
| + // Unset the client before the command_buffer_ is destroyed, similar to how
|
| + // WeakPtrFactory invalidates before it.
|
| + if (command_buffer_)
|
| + command_buffer_->SetGpuControlClient(nullptr);
|
| }
|
|
|
| // static
|
|
|