Three criteria can help assess whether rioting is defensible.