Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void draw(Canvas canvas) {
}

public void drawMask(Canvas canvas) {
if (mLayerManager.hasImageLayers()) {
if (mLayerManager.hasImageLayers() && !getBounds().isEmpty()) {
RectF borderRect = new RectF(getBounds());
RectF paddingRect = new RectF(mPaddingBox);
RectF contentRect = new RectF(mContentBox);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public void destroy() {
@Override
public void afterDraw(Canvas canvas) {
super.afterDraw(canvas);
if (getMaskDrawable() != null) {
if (getMaskDrawable() != null && getWidth() > 0 && getHeight() > 0) {
getMaskDrawable().setBounds(0, 0, getWidth(), getHeight());
getMaskDrawable().draw(canvas);
}
Expand Down
Loading