Skip to content

Commit

Permalink
Fixes NPE when activity is destroyed by OS (#402)
Browse files Browse the repository at this point in the history
Closes #402.
  • Loading branch information
miguelpruivo committed Sep 28, 2020
1 parent 0609cae commit d2ecbd3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 2.0.5
Android: Fixes [#402](https://github.com/miguelpruivo/flutter_file_picker/issues/402).

## 2.0.4
Desktop (Go): Fixes directory pick on Linux.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ public void setEventHandler(final EventChannel.EventSink eventSink) {
@Override
public boolean onActivityResult(final int requestCode, final int resultCode, final Intent data) {

if(type == null) {
return false;
}

if (requestCode == REQUEST_CODE && resultCode == Activity.RESULT_OK) {

if (eventSink != null) {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: file_picker
description: A package that allows you to use a native file explorer to pick single or multiple absolute file paths, with extension filtering support.
homepage: https://github.com/miguelpruivo/plugins_flutter_file_picker
version: 2.0.4
version: 2.0.5

dependencies:
flutter:
Expand Down

0 comments on commit d2ecbd3

Please sign in to comment.