From 4793e57051bf17620e93f62e2651fc5df1708935 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 2 May 2019 18:50:05 +0200 Subject: tracker/{aruco,easy,pt}: bail out when camera missing --- tracker-aruco/ftnoir_tracker_aruco.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tracker-aruco') diff --git a/tracker-aruco/ftnoir_tracker_aruco.cpp b/tracker-aruco/ftnoir_tracker_aruco.cpp index d9cb2b96..bdb41d44 100644 --- a/tracker-aruco/ftnoir_tracker_aruco.cpp +++ b/tracker-aruco/ftnoir_tracker_aruco.cpp @@ -164,6 +164,10 @@ bool aruco_tracker::open_camera() QMutexLocker l(&camera_mtx); camera = video::make_camera(s.camera_name); + + if (!camera) + return false; + video::impl::camera::info args {}; if (res.width) -- cgit v1.2.3