From b1f641356dba697e37b5675768c4aa73704a40a0 Mon Sep 17 00:00:00 2001 From: Me No Dev Date: Thu, 4 Jun 2020 06:04:31 +0300 Subject: [PATCH] Fix a bug causing exception if the camera did not initialise (#145) --- examples/single_chip/camera_web_server/main/app_mdns.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/single_chip/camera_web_server/main/app_mdns.c b/examples/single_chip/camera_web_server/main/app_mdns.c index 4cdc825..17449aa 100644 --- a/examples/single_chip/camera_web_server/main/app_mdns.c +++ b/examples/single_chip/camera_web_server/main/app_mdns.c @@ -178,6 +178,9 @@ void app_mdns_main() xSemaphoreGive(query_lock); sensor_t * s = esp_camera_sensor_get(); + if(s == NULL){ + return; + } switch(s->id.PID){ case OV2640_PID: model = "OV2640"; break; case OV3660_PID: model = "OV3660"; break;