summaryrefslogtreecommitdiffstats
path: root/webkit/plugins/ppapi/ppb_surface_3d_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/plugins/ppapi/ppb_surface_3d_impl.cc')
-rw-r--r--webkit/plugins/ppapi/ppb_surface_3d_impl.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/webkit/plugins/ppapi/ppb_surface_3d_impl.cc b/webkit/plugins/ppapi/ppb_surface_3d_impl.cc
index b735c1d..f90591f 100644
--- a/webkit/plugins/ppapi/ppb_surface_3d_impl.cc
+++ b/webkit/plugins/ppapi/ppb_surface_3d_impl.cc
@@ -192,6 +192,11 @@ void PPB_Surface3D_Impl::OnContextLost() {
}
void PPB_Surface3D_Impl::SendContextLost() {
+ // By the time we run this, the instance may have been deleted, or in the
+ // process of being deleted. Even in the latter case, we don't want to send a
+ // callback after DidDestroy.
+ if (!instance() || !instance()->container())
+ return;
const PPP_Graphics3D_Dev* ppp_graphics_3d =
static_cast<const PPP_Graphics3D_Dev*>(
instance()->module()->GetPluginInterface(