The 41-year-old is in the African country for the charity, finding out the struggles some of the people have to go through.
While sleeping rough with boys Fred, Maurice and Hannington, a car crashed into the ditch – just missing them.
The official Comic Relief Twitter account posted pictures of the crash, adding: “Everyone is fine but a big lucky escape.”
But the accident just showed what is sadly normal life for the boys. Comic Relief posted: “It’s an incredibly vulnerable place to sleep which is why they stick together.
“The cars, motorbikes and rickshaws are so close the noise is something to behold. A car has crashed into a ditch just feet away from the boys.
“Shaken up by the near miss the boys are chatting with @radioleary – main topics snow and Arsenal.
“Despite noisy stragglers from a bar milling past, Dermot and the little men are finally settling.”
This week Dermot will dance for 24 hours straight to raise money for Comic Relief.
To sponsor the X Factor host click here.