sharish/ScratchView

com.cooltechworks.views.ScratchImageView.getImageBounds (ScratchImageView.java:397)

Opened this issue · 4 comments

I am getting repeated crash in this.

Fatal Exception: java.lang.NullPointerException
Attempt to invoke virtual method 'android.graphics.Rect android.graphics.drawable.Drawable.getBounds()' on a null object reference
com.cooltechworks.views.ScratchImageView.getImageBounds

@varundwarkani : Can you get your sample code or fork the repo and send a snapshot with step to reproduce

yeh the problem is real .

Fix :
I used mDrawable instead of getDrawable() in getImageBounds function . Dont know if the solution has any side-effects, but works just fine for me.

Can i get .jar file for this scratch view