Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.setDrawingCacheEnabled(boolean)' on a null object reference #13

Open
alexeyvasilyev opened this issue Jun 27, 2015 · 0 comments

Comments

@alexeyvasilyev
Copy link

Got a crash from one user.
Making a null pointer check will solve this issue I guess in stopDrag(), e.g.

        if (item != null) {
            item.setDrawingCacheEnabled(false);
            item.destroyDrawingCache();

            item.setVisibility(View.VISIBLE);
        }

Android: 5.0.1
Manufacturer: samsung
Model: SM-N915G

java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.setDrawingCacheEnabled(boolean)' on a null object reference
    at com.terlici.dragndroplist.DragNDropListView.stopDrag(SourceFile:265)
    at com.terlici.dragndroplist.DragNDropListView.onTouchEvent(SourceFile:162)
    at android.view.View.dispatchTouchEvent(View.java:8975)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2698)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2410)
    at android.widget.AbsListView.dispatchTouchEvent(AbsListView.java:5308)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2709)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2425)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2709)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2425)
  [SKIPPED]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant