JAL-4134 fix NPEs when matrix not resolved or alignment view is closed