fix NPE in saveViolation (#80)

Please merge only 2nd commit (9c6a633). I still have to learn some git commands :-(