Fixed introduced crash.

This commit is contained in:
GaidamakUA 2016-03-30 11:30:47 +03:00
parent 7c4161cf1b
commit 4b695ba06c

View file

@ -154,9 +154,9 @@ public class ContextMenuAdapter {
tv.setCompoundDrawables(imageId, null, null, null);
tv.setCompoundDrawablePadding(paddingInPixels);
} else {
if (item.getLightIcon() != -1) {
Drawable drawable = ContextCompat.getDrawable(getContext(), item.getLightIcon());
DrawableCompat.setTint(drawable, item.getThemedColor(getContext()));
if (drawable != null) {
((AppCompatImageView) convertView.findViewById(R.id.icon)).setImageDrawable(drawable);
convertView.findViewById(R.id.icon).setVisibility(View.VISIBLE);
} else if (convertView.findViewById(R.id.icon) != null) {