Bug 1530489 - Checking VRGPUParent is available before closing it. r=kip
authorDaosheng Mu <daoshengmu@gmail.com>
Wed, 27 Feb 2019 22:38:58 +0000
changeset 519447 9b84cbe0e2a3e0ec2e29c7e79a7a080025816a15
parent 519446 170b333092c82ce0cf39eec04f91f3700c9260e4
child 519448 20c54f8dd7fa7ad7390330856a1a7f666bbcbf12
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskip
bugs1530489
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1530489 - Checking VRGPUParent is available before closing it. r=kip Differential Revision: https://phabricator.services.mozilla.com/D21064
gfx/vr/ipc/VRParent.cpp
--- a/gfx/vr/ipc/VRParent.cpp
+++ b/gfx/vr/ipc/VRParent.cpp
@@ -93,17 +93,17 @@ mozilla::ipc::IPCResult VRParent::RecvOp
   return IPC_OK();
 }
 
 void VRParent::ActorDestroy(ActorDestroyReason aWhy) {
   if (AbnormalShutdown == aWhy) {
     NS_WARNING("Shutting down VR process early due to a crash!");
     ProcessChild::QuickExit();
   }
-  if (!mVRGPUParent->IsClosed()) {
+  if (mVRGPUParent && !mVRGPUParent->IsClosed()) {
     mVRGPUParent->Close();
   }
   mVRGPUParent = nullptr;
 
 #ifndef NS_FREE_PERMANENT_DATA
   // No point in going through XPCOM shutdown because we don't keep persistent
   // state.
   ProcessChild::QuickExit();