Skip to content

Commit 71a79c8

Browse files
committed
Added extra check to prevent the bitmap from being "null" when drawing. #42
1 parent 11255b0 commit 71a79c8

File tree

1 file changed

+1
-1
lines changed
  • library/src/main/java/io/github/douglasjunior/androidSimpleTooltip

1 file changed

+1
-1
lines changed

library/src/main/java/io/github/douglasjunior/androidSimpleTooltip/OverlayView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public class OverlayView extends View {
6464

6565
@Override
6666
protected void dispatchDraw(Canvas canvas) {
67-
if (invalidated)
67+
if (invalidated || bitmap == null || bitmap.isRecycled())
6868
createWindowFrame();
6969

7070
canvas.drawBitmap(bitmap, 0, 0, null);

0 commit comments

Comments
 (0)