Use GrSurfaceProxyView for dst proxies.

Bug: skia:9556
Change-Id: I41ae112a3d22f6c6481cba1afc3937b5e5115cf5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252043
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrSurfaceProxyView.h b/src/gpu/GrSurfaceProxyView.h
index 419c117..268f035 100644
--- a/src/gpu/GrSurfaceProxyView.h
+++ b/src/gpu/GrSurfaceProxyView.h
@@ -37,8 +37,18 @@
     bool operator!=(const GrSurfaceProxyView& other) const { return !(*this == other); }
 
     GrSurfaceProxy* proxy() const { return fProxy.get(); }
-    GrTextureProxy* asTextureProxy() const { return fProxy->asTextureProxy(); }
-    GrRenderTargetProxy* asRenderTargetProxy() const { return fProxy->asRenderTargetProxy(); }
+    GrTextureProxy* asTextureProxy() const {
+        if (!fProxy) {
+            return nullptr;
+        }
+        return fProxy->asTextureProxy();
+    }
+    GrRenderTargetProxy* asRenderTargetProxy() const {
+        if (!fProxy) {
+            return nullptr;
+        }
+        return fProxy->asRenderTargetProxy();
+    }
 
     GrSurfaceOrigin origin() const { return fOrigin; }
     const GrSwizzle& swizzle() const { return fSwizzle; }