Check for failed buffer creation before removing scratch key.

My previous CL, https://skia-review.googlesource.com/c/skia/+/771477,
which stopped swiftshader from reusing buffers is the first time we're
using that cap. Thus the reason we've never hit this missing check
before.

Bug: chromium:1499355
Change-Id: I3a6f0f276054e29c198fc991132d7120fe5c07e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/773944
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
1 file changed