Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Fix NRE; Return 0 if Text null #3594

Merged
merged 1 commit into from
Aug 21, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix NRE; Ret 0 if Text null
  • Loading branch information
kingces95 committed Aug 16, 2018
commit d17ec30798d5233eccd376f154628ab688e58ceb
2 changes: 1 addition & 1 deletion Xamarin.Forms.Platform.iOS/Extensions/LabelExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public static void RecalculateSpanPositions(this NativeLabel control, Label elem
var span = element.FormattedText.Spans[i];

var location = currentLocation;
var length = span.Text.Length;
var length = span.Text?.Length ?? 0;

if (length == 0)
continue;
Expand Down