diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-10-24 15:37:18 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-10-24 15:37:18 +0200 |
commit | 25e19a66f165835816034d61e98801312b91a4a3 (patch) | |
tree | 2ecd0512d5bb6c9c7ef2b57d0b10c2cbaf3226a9 /ftnoir_tracker_rift/ftnoir_tracker_rift.cpp | |
parent | 19eab3db0359963acf734bd6bfee1213e40f1171 (diff) |
rift: fix crash with no device
Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>
Diffstat (limited to 'ftnoir_tracker_rift/ftnoir_tracker_rift.cpp')
-rw-r--r-- | ftnoir_tracker_rift/ftnoir_tracker_rift.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp b/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp index 7fade51c..965e849b 100644 --- a/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp +++ b/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp @@ -25,10 +25,14 @@ Rift_Tracker::Rift_Tracker() Rift_Tracker::~Rift_Tracker() { - pSensor->Release(); - delete pSFusion; - pHMD->Release(); - pManager->Release(); + if (pSensor) + pSensor->Release(); + if (pSFusion) + delete pSFusion; + if (pHMD) + pHMD->Release(); + if (pManager) + pManager->Release(); System::Destroy(); } @@ -36,7 +40,6 @@ Rift_Tracker::~Rift_Tracker() void Rift_Tracker::StartTracker(QFrame* videoFrame) { - loadSettings(); // // Startup the Oculus SDK device handling, use the first Rift sensor we find. |