A Texas family is fortunate their home wasn't a total loss after a phone left charging on a bed sparked a fire.

KHOU reports that a family in Flour Bluff returned home from shopping to find thick smoke coming from a bedroom in their house. The family made it out safely.

When firefighters arrived, they determined that the flames were most likely caused by a cell phone left plugged in and charging on a bed.

Assistant Flour Bluff Fire Chief Weston Beseda took the opportunity to warn people not to leave electronics charging on surfaces like pillows, mattresses, blankets, or just out on the bed in general. They should always be placed on nightstands, shelves, or other hard surfaces and given plenty of space when possible.

A study from 2016 found that over half of teens leave their phone on a bed or pillow while charging it. Alarmingly, 38% admitted to leaving their devices under their pillow while they're plugged in.

With no way for the heat generated by the charging device to dissipate, these situations can easily result in fires.

Beseda also credited a closed door with helping keep flames from spreading to the rest of the family's home. According to Fire Engineering, a closed door can reduce the oxygen level in a flaming room, decrease the heat release rate, and slow the spread of flames.

Grownups likely know not to leave electronics charging on soft surfaces like beds and under pillows, but if you have kids, please talk to them about the dangers.

More From KUSJ-FM