Skip to content

Commit

Permalink
fixed NPE when saving conversion state
Browse files Browse the repository at this point in the history
  • Loading branch information
pshadlyn committed Nov 9, 2015
1 parent f7dda39 commit 841001f
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import android.text.Editable;
import android.text.InputType;
import android.text.TextWatcher;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
Expand Down Expand Up @@ -189,7 +190,11 @@ public void onPause()
mTxtValue.removeTextChangedListener(mTextWatcher);
mPrefs.setLastValue(mTxtValue.getText().toString());
mPrefs.setLastConversion(mConversionId);
DataAccess.getInstance(getActivity()).saveConversionState(mState);

if (mState != null)
{
DataAccess.getInstance(getActivity()).saveConversionState(mState);
}
}

@Override
Expand Down

0 comments on commit 841001f

Please sign in to comment.