Skip to content

Commit

Permalink
Merge pull request #1615 from Lilian-C/fix-file-picker-delegate-nulls…
Browse files Browse the repository at this point in the history
…afety

Fix null safety in filepickerdelegate
  • Loading branch information
navaronbracke authored Oct 19, 2024
2 parents 8bbe066 + 17e8637 commit 36eccd1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 8.1.3
### Android
- Fixes a null object reference error [#1604](https://github.com/miguelpruivo/flutter_file_picker/issues/1604)

## 8.1.2
### Android
- Fixes a cache deletion issue [#1505](https://github.com/miguelpruivo/flutter_file_picker/issues/1505)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ public boolean onActivityResult(final int requestCode, final int resultCode, fin
// Save file
if (requestCode == SAVE_FILE_CODE) {
if (resultCode == Activity.RESULT_OK) {
if (data == null) {
return false;
}
this.dispatchEventStatus(true);
final Uri uri = data.getData();
if (uri != null) {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A package that allows you to use a native file explorer to pick sin
homepage: https://github.com/miguelpruivo/plugins_flutter_file_picker
repository: https://github.com/miguelpruivo/flutter_file_picker
issue_tracker: https://github.com/miguelpruivo/flutter_file_picker/issues
version: 8.1.2
version: 8.1.3

dependencies:
flutter:
Expand Down

0 comments on commit 36eccd1

Please sign in to comment.