summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ftnoir_tracker_rift/ftnoir_tracker_rift.cpp')
-rw-r--r--ftnoir_tracker_rift/ftnoir_tracker_rift.cpp13
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.