A brick was allegedly thrown through a taxi driver's window, narrowly missing his head, as he waited at a taxi rank in Midlothian.
Swift Taxis said one of their drivers was targeted as he waited in Dalkeith on Saturday night.
An 18-year-old man has been arrested and charged in connection with the incident.
The Newtongrange-based taxi firm said: "If anyone has any information on the idiot who put a brick through one of Swift Taxis windows just missing the driver's head last night, while he sat on Dalkeith rank, smashing both driver and passenger window as brick was thrown with some force.
"Let us or Dalkeith police station know please, police are hoping to look at cctv but this can take a while."
"An 18-year-old man has been charged in connection with the incident and appeared at Edinburgh Sheriff Court on Monday, 3 February, 2020."