Police asked a McDonald's in Edinburgh not to sell ice cream or milkshakes during a rally run by Nigel Farage.
As hundreds of Brexit Party supporters joined a rally led by Mr Farage at Edinburgh's Corn Exchange, the nearby branch of the fast food chain avoided selling the products - to prevent a repeat of recent dairy-based attacks.
The branch on Chesser Avenue also had to increase its door security between 6pm and 10pm.
It comes after far-right figures including Tommy Robinson and Carl Benjamin have had food and drink thrown at them as they campaign.
The former English Defence League leader, whose real name is Stephen Yaxley-Lennon, has been hit by milkshakes twice in two days while on the campaign trail in the north of England.
Printed signs saying "We will not be selling milkshakes or ice creams tonight. This is due to a police request given recent events" were displayed on the windows and inside the fast food restaurant.
Dozens of protesters lined the street outside the rally on Friday evening.
Police Scotland did not comment, but a member of staff who wanted to stay anonymous told the Press Association the situation was "ridiculous".
A McDonald's spokesman said: "At the request of Police Scotland, we temporarily removed our McFlurry and milkshake products from sale in our Chesser Avenue restaurant yesterday evening."
Never one to miss an opportunity, Burger King tweeted: "Dear people of Scotland. We're selling milkshakes all weekend. Have fun. Love BK #justsaying."
Mr Benjamin was at a public meeting in Cornwall when a protester tried to throw a drink over him.