SkUTF: Avoid potential nullptr dereference

next_fail() dereferences the first argument.  So calling
next_fail() with the first argument of 'ptr' when we know 'ptr'
is nullptr will cause a problem.

For NextUTF16(), we instead return -1 when we know 'ptr' is
nullptr, just as the code currently does for NextUTF8() and
NextUTF32().

Change-Id: Ifabb45c694d6e3dbeee5ac7b953f15895cea3a69
Reviewed-on: https://skia-review.googlesource.com/c/191420
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
1 file changed