Merge "Add null check to offsetCaptionLocation" into main