More generally, the whole point of vigilantism is going outside the established judicial framework. If there is no such framework, the concept of vigilantism is meaningless.
As to what prevents/discourages this behaviour, the answer is mostly going to be "the presence of an existing judicial structure, backed by force, which disallows such behaviour".