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

Commit

Permalink
Fix NRE; Ret 0 if Text null (#3594) fixes #3579
Browse files Browse the repository at this point in the history
  • Loading branch information
kingces95 authored and rmarinho committed Aug 21, 2018
1 parent 5e02ea6 commit 712361c
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit 712361c

Please sign in to comment.