summaryrefslogtreecommitdiffstatsci
path: root/src/skia-shapes.cpp
diff options
context:
space:
mode:
authorsuyambulingamrm <suyambu.rm@samsung.com>2014-06-26 21:23:43 +0530
committersuyambulingamrm <suyambu.rm@samsung.com>2014-06-26 21:23:43 +0530
commitc4ee5fa66a6388c5244bd9cda704097ffa71df45 (patch)
tree0ed7b704a74817f26d104531d2522226d2965679 /src/skia-shapes.cpp
parentb97546a2c39600d28be46d7a5c9d1b251dd22b04 (diff)
Issue #105 Add null check for stock_image_path.
Diffstat (limited to 'src/skia-shapes.cpp')
-rw-r--r--src/skia-shapes.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/skia-shapes.cpp b/src/skia-shapes.cpp
index a660f01..ec224e7 100644
--- a/src/skia-shapes.cpp
+++ b/src/skia-shapes.cpp
@@ -70,9 +70,11 @@ sk_set_fill_style(caskbench_context_t *ctx, const shapes_t *shape)
ctx->skia_paint->setShader(shader);
break;
case CB_FILL_IMAGE_PATTERN:
+ if (ctx->stock_image_path) {
shader = skiaCreateBitmapShader(ctx->stock_image_path);
ctx->skia_paint->setStyle(SkPaint::kFill_Style);
ctx->skia_paint->setShader(shader);
+ }
break;
#if 0
case CB_FILL_HERRINGBONE_PATTERN: /* TODO */