Fixed an NPE for BZ#1080207