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

Fix crashes. #5

Closed
wants to merge 2 commits into from
Closed

Fix crashes. #5

wants to merge 2 commits into from

Conversation

luciofm
Copy link
Contributor

@luciofm luciofm commented Jul 29, 2014

Fix a Divide by zero crash and NPE on view clear.

} while (animating);
} while (animating);
} catch (Exception e) {
// probably a NullPointerException caused by clearing the GifImageView...
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather catch the root cause of the NPE instead of a huge try-catch block here...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It NPE because we set gifDecoder to null on clear()...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other way is synchronise clear with this thread...

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

Successfully merging this pull request may close these issues.

None yet

2 participants