summaryrefslogtreecommitdiffstats
path: root/libs/hwui/TextDropShadowCache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/TextDropShadowCache.cpp')
-rw-r--r--libs/hwui/TextDropShadowCache.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/hwui/TextDropShadowCache.cpp b/libs/hwui/TextDropShadowCache.cpp
index f1f35bd..6976eaa 100644
--- a/libs/hwui/TextDropShadowCache.cpp
+++ b/libs/hwui/TextDropShadowCache.cpp
@@ -178,6 +178,10 @@ ShadowTexture* TextDropShadowCache::get(SkPaint* paint, const char* text, uint32
FontRenderer::DropShadow shadow = mRenderer->renderDropShadow(&paintCopy, text, 0,
len, numGlyphs, radius, positions);
+ if (!shadow.image) {
+ return NULL;
+ }
+
texture = new ShadowTexture;
texture->left = shadow.penX;
texture->top = shadow.penY;