Permalink
Browse files

Ensure the shader exists before attempting to draw

Summary: The shader doesnt necessarily exist when drawing the drawable, so we add a check for that

Differential Revision: D8789279

fbshipit-source-id: f8393d1d3022d4268a37f13318e7c73f52b351af
  • Loading branch information...
xiphirx authored and facebook-github-bot committed Jul 10, 2018
1 parent 58af197 commit 473ed7582ca52931b3261aa9099d62bae540f304
Showing with 1 addition and 1 deletion.
  1. +1 −1 shimmer/src/main/java/com/facebook/shimmer/ShimmerDrawable.java
@@ -88,7 +88,7 @@ public void onBoundsChange(Rect bounds) {
@Override
public void draw(@NonNull Canvas canvas) {
if (mShimmer == null) {
if (mShimmer == null || mShimmerPaint.getShader() == null) {
return;
}

0 comments on commit 473ed75

Please sign in to comment.