Do not crash when the resources are missing

In test_conversion_possible

BUG=skia:5314

Change-Id: Ia0e4178a262820b4161e55e07b0669f18322a64b
Reviewed-on: https://skia-review.googlesource.com/7742
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
diff --git a/tests/CodecTest.cpp b/tests/CodecTest.cpp
index 1ef71b3..4083cfa 100644
--- a/tests/CodecTest.cpp
+++ b/tests/CodecTest.cpp
@@ -1186,7 +1186,16 @@
                                      bool supportsScanlineDecoder,
                                      bool supportsIncrementalDecoder) {
     std::unique_ptr<SkStream> stream(GetResourceAsStream(path));
+    if (!stream) {
+        return;
+    }
+
     std::unique_ptr<SkCodec> codec(SkCodec::NewFromStream(stream.release()));
+    if (!codec) {
+        ERRORF(r, "failed to create a codec for %s", path);
+        return;
+    }
+
     SkImageInfo infoF16 = codec->getInfo().makeColorType(kRGBA_F16_SkColorType);
 
     SkBitmap bm;