summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tracker-wii/wii_camera.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/tracker-wii/wii_camera.cpp b/tracker-wii/wii_camera.cpp
index f6f8726f..1f769819 100644
--- a/tracker-wii/wii_camera.cpp
+++ b/tracker-wii/wii_camera.cpp
@@ -98,19 +98,20 @@ bool WIICamera::start(const QString&, int, int, int)
void WIICamera::stop()
{
- onExit = true;
- m_pDev->ChangedCallback = nullptr;
- m_pDev->Disconnect();
- Beep(1000, 200);
- if (m_pDev) {
- m_pDev=nullptr;
- m_pDev = nullptr;
- }
-
desired_name = QString();
active_name = QString();
cam_info = pt_camera_info();
cam_desired = pt_camera_info();
+ onExit = true;
+
+ if (m_pDev)
+ {
+ m_pDev->ChangedCallback = nullptr;
+ m_pDev->Disconnect();
+ m_pDev = nullptr;
+ }
+
+ Beep(1000, 200);
}