Fix crash when lead image is abnormally small.

Bug: T84881
Change-Id: Ia59603e698305ef4ac0a5e4342a7b71fc9aa637f