| Index: device/vr/vr_service_impl.cc
|
| diff --git a/device/vr/vr_service_impl.cc b/device/vr/vr_service_impl.cc
|
| index f80037060840dcd2fe3e24e3633c93e4f5fbecc0..9d0fb36618c53e59443d23faf2597e3da3f59b4d 100644
|
| --- a/device/vr/vr_service_impl.cc
|
| +++ b/device/vr/vr_service_impl.cc
|
| @@ -17,6 +17,10 @@ namespace device {
|
| VRServiceImpl::VRServiceImpl() : listening_for_activate_(false) {}
|
|
|
| VRServiceImpl::~VRServiceImpl() {
|
| + // Destroy VRDisplay before calling RemoveService below. RemoveService might
|
| + // implicitly trigger destory VRDevice which VRDisplay needs to access in its
|
| + // dtor.
|
| + displays_.clear();
|
| VRDeviceManager::GetInstance()->RemoveService(this);
|
| }
|
|
|
|
|