Fix NPE crash found in bugID 6548138210885632