Skip to content

Commit

Permalink
Merge pull request #243 from rydein/feature/fix-null
Browse files Browse the repository at this point in the history
fix exception when intent is null
  • Loading branch information
charafau authored Nov 19, 2018
2 parents f679fc2 + ad257b6 commit 43ef16e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public boolean handleResult(int requestCode, int resultCode, Intent intent){
if(Build.VERSION.SDK_INT >= 21){
if(requestCode == FILECHOOSER_RESULTCODE){
Uri[] results = null;
if(resultCode == Activity.RESULT_OK){
if(resultCode == Activity.RESULT_OK && intent != null){
String dataString = intent.getDataString();
if(dataString != null){
results = new Uri[]{ Uri.parse(dataString) };
Expand Down

0 comments on commit 43ef16e

Please sign in to comment.