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

快速切换报空指针异常 #17

Open
coding404 opened this issue Sep 4, 2017 · 1 comment
Open

快速切换报空指针异常 #17

coding404 opened this issue Sep 4, 2017 · 1 comment

Comments

@coding404
Copy link

将SIMPLE TEXT TAG和CUSTOM VIEW TAG多次切换后程序奔溃,日志显示空指针异常
FATAL EXCEPTION: main Process: com.moxun.tagcloud, PID: 20838 java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.setBackgroundColor(int)' on a null object reference at com.moxun.tagcloud.ViewTagsAdapter.onThemeColorChanged(ViewTagsAdapter.java:38) at com.moxun.tagcloudlib.view.TagCloudView.onLayout(TagCloudView.java:282) at android.view.View.layout(View.java:15697) at android.view.ViewGroup.layout(ViewGroup.java:5050) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1703) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1557) at android.widget.LinearLayout.onLayout(LinearLayout.java:1466) at android.view.View.layout(View.java:15697) at android.view.ViewGroup.layout(ViewGroup.java:5050)
原因是ViewTagsAdapter中onThemeColorChanged方法未做判空过滤。

@misakuo
Copy link
Owner

misakuo commented Sep 12, 2017

欢迎提交PR修复

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

2 participants