Possible fix for crash reported on Google Play (Null Pointer Exception in OnAddonEnabled). Can't reproduce this.

This commit is contained in:
Synced Synapse 2015-03-23 23:15:56 +00:00
parent 0266f7f3ab
commit df2ad401d5
1 changed files with 2 additions and 1 deletions

View File

@ -209,7 +209,8 @@ public class AddonDetailsFragment extends Fragment {
@OnClick(R.id.enable_disable)
public void onEnabledClicked(View v) {
final Boolean isEnabled = (Boolean)v.getTag();
final Boolean isEnabled = (v.getTag() == null)? false : (Boolean)v.getTag();
Addons.SetAddonEnabled action = new Addons.SetAddonEnabled(addonId, !isEnabled);
action.execute(hostManager.getConnection(), new ApiCallback<String>() {
@Override