Stop valgrind bot from crashing
Stop valgrind bot from crashing

make_surface is returning nullptr, resulting in an invalid read.

Add an error message with debugging information and skip this
iteration.

Also switch to cleaner for loop syntax.

BUG=skia:5282
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1959173002

Review-Url: https://codereview.chromium.org/1959173002

google/skia,rubenvb/skia,google/skia,rubenvb/skia,google/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,rubenvb/skia,rubenvb/skia,HalCanary/skia-hc,google/skia,HalCanary/skia-hc,rubenvb/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,HalCanary/skia-hc,google/skia,google/skia,HalCanary/skia-hc,rubenvb/skia,rubenvb/skia,google/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,rubenvb/skia,google/skia,HalCanary/skia-hc,HalCanary/skia-hc,google/skia,google/skia