Index: src/gpu/SkGr.cpp |
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp |
index a87caf7a708ccbb1fdef30ad76fb72978a47fb1b..332f084c5b0193467264a806bcc70f3235a5dc3e 100644 |
--- a/src/gpu/SkGr.cpp |
+++ b/src/gpu/SkGr.cpp |
@@ -116,14 +116,18 @@ static void get_stretch(const GrContext* ctx, int width, int height, |
stretch->fHeight = SkTMax(height, ctx->caps()->minTextureSize()); |
} |
if (doStretch) { |
- switch(params->filterMode()) { |
- case GrTextureParams::kNone_FilterMode: |
- stretch->fType = Stretch::kNearest_Type; |
- break; |
- case GrTextureParams::kBilerp_FilterMode: |
- case GrTextureParams::kMipMap_FilterMode: |
- stretch->fType = Stretch::kBilerp_Type; |
- break; |
+ if (params) { |
+ switch(params->filterMode()) { |
+ case GrTextureParams::kNone_FilterMode: |
+ stretch->fType = Stretch::kNearest_Type; |
+ break; |
+ case GrTextureParams::kBilerp_FilterMode: |
+ case GrTextureParams::kMipMap_FilterMode: |
+ stretch->fType = Stretch::kBilerp_Type; |
+ break; |
+ } |
+ } else { |
+ stretch->fType = Stretch::kBilerp_Type; |
} |
} else { |
stretch->fWidth = -1; |