aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/SkLayerDrawLooper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/effects/SkLayerDrawLooper.cpp')
-rw-r--r--src/effects/SkLayerDrawLooper.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/effects/SkLayerDrawLooper.cpp b/src/effects/SkLayerDrawLooper.cpp
index 6a8254d894..db61e08c4f 100644
--- a/src/effects/SkLayerDrawLooper.cpp
+++ b/src/effects/SkLayerDrawLooper.cpp
@@ -272,6 +272,9 @@ sk_sp<SkFlattenable> SkLayerDrawLooper::CreateProc(SkReadBuffer& buffer) {
buffer.readPoint(&info.fOffset);
info.fPostTranslate = buffer.readBool();
buffer.readPaint(builder.addLayerOnTop(info));
+ if (!buffer.isValid()) {
+ return nullptr;
+ }
}
return builder.detach();
}