Skip to content

Commit

Permalink
Handling empty extras on preference fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
mendhak committed Apr 4, 2015
1 parent 3b32b09 commit 41004a3
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ protected void onCreate(Bundle savedInstanceState) {

tracer = LoggerFactory.getLogger(MainPreferenceActivity.class.getSimpleName());

String whichFragment = getIntent().getExtras().getString("preference_fragment");
String whichFragment = PreferenceConstants.GENERAL;

if(getIntent().getExtras() != null) {
whichFragment = getIntent().getExtras().getString("preference_fragment");
}

//If OpenStreetMap has returned with OAuth token
if(getIntent().getData() != null) {
Expand Down

0 comments on commit 41004a3

Please sign in to comment.