diff --git a/driver-contexts/camera_driver.c b/driver-contexts/camera_driver.c index 40911ef94f..d96fd7699b 100644 --- a/driver-contexts/camera_driver.c +++ b/driver-contexts/camera_driver.c @@ -76,12 +76,12 @@ void find_next_camera_driver(void) bool driver_camera_start(void) { - if (driver.camera && driver.camera_data) + if (driver.camera && driver.camera_data && driver.camera->start) { if (g_settings.camera.allow) return driver.camera->start(driver.camera_data); - - msg_queue_push(g_extern.msg_queue, "Camera is explicitly disabled.\n", 1, 180); + else + msg_queue_push(g_extern.msg_queue, "Camera is explicitly disabled.\n", 1, 180); return false; } else diff --git a/driver-contexts/location_driver.c b/driver-contexts/location_driver.c index 47cb9eae70..0fc68443b9 100644 --- a/driver-contexts/location_driver.c +++ b/driver-contexts/location_driver.c @@ -70,12 +70,12 @@ void find_next_location_driver(void) bool driver_location_start(void) { - if (driver.location && driver.location_data) + if (driver.location && driver.location_data && driver.location->start) { if (g_settings.location.allow) return driver.location->start(driver.location_data); - - msg_queue_push(g_extern.msg_queue, "Location is explicitly disabled.\n", 1, 180); + else + msg_queue_push(g_extern.msg_queue, "Location is explicitly disabled.\n", 1, 180); return false; } else