Fix crash on invalid corner markers