Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Commit

Permalink
Ensure the shader exists before attempting to draw
Browse files Browse the repository at this point in the history
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 473ed75
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -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;
}

Expand Down

0 comments on commit 473ed75

Please sign in to comment.