aboutsummaryrefslogtreecommitdiffstats
path: root/support/magicleap/Servo2D/code/src/Servo2D.cpp
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2018-11-06 01:08:07 -0500
committerGitHub <noreply@github.com>2018-11-06 01:08:07 -0500
commite265fcfc3ca55b1a23ee7d1ad24f8f334187be11 (patch)
treebf8eadc93829e9fc4a9306cc82f688b228b0ae3e /support/magicleap/Servo2D/code/src/Servo2D.cpp
parent7a3daac613c3d87782ef5cf2062ca7cfd8606bdc (diff)
parent6088ade74684791acd14d94dbaf96581cd7028e8 (diff)
downloadservo-e265fcfc3ca55b1a23ee7d1ad24f8f334187be11.tar.gz
servo-e265fcfc3ca55b1a23ee7d1ad24f8f334187be11.zip
Auto merge of #22094 - asajeffrey:magicleap-shutdown, r=paulrouget
Shut down Servo when the ML app quits <!-- Please describe your changes on the following line: --> Shut down servo when shutting down the magic leap app. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes do not require tests because we don't test ML <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22094) <!-- Reviewable:end -->
Diffstat (limited to 'support/magicleap/Servo2D/code/src/Servo2D.cpp')
-rw-r--r--support/magicleap/Servo2D/code/src/Servo2D.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/support/magicleap/Servo2D/code/src/Servo2D.cpp b/support/magicleap/Servo2D/code/src/Servo2D.cpp
index 81babf942c5..1b7fb3463db 100644
--- a/support/magicleap/Servo2D/code/src/Servo2D.cpp
+++ b/support/magicleap/Servo2D/code/src/Servo2D.cpp
@@ -59,8 +59,6 @@ Servo2D::Servo2D() {
// Destroy a Servo 2D instance
Servo2D::~Servo2D() {
ML_LOG(Debug, "Servo2D Destructor.");
- discard_servo(servo_);
- servo_ = nullptr;
}
// The prism dimensions
@@ -168,6 +166,8 @@ int Servo2D::init() {
int Servo2D::deInit() {
ML_LOG(Debug, "Servo2D Deinitializing.");
+ discard_servo(servo_);
+ servo_ = nullptr;
return 0;
}