Depends on where you are. In the US there's the Exigent Circumstances exception to the warrant requirement. Not sure if the same theory has been included in EU countries but I would be surprised if it hadn't, a quick search didn't turn up much english language about it.
https://www.ce9.uscourts.gov/jury-instructions/node/155