This fixes a NPE which arises when a resource for a violation couldnt be found.