Skip to content

Commit

Permalink
Merge pull request #1340 from kirill-21/master
Browse files Browse the repository at this point in the history
Fixed crashing on windows when picking a directory
  • Loading branch information
miguelpruivo committed Aug 25, 2023
2 parents 55e27f0 + e65d4f3 commit 316e9d3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 5.3.4
fix [#1317](https://github.com/miguelpruivo/flutter_file_picker/issues/1317)
## 5.3.3
fix [#1312](https://github.com/miguelpruivo/flutter_file_picker/issues/1312)
## 5.3.2
Expand Down
2 changes: 0 additions & 2 deletions lib/src/windows/file_picker_windows.dart
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ class FilePickerWindows extends FilePicker {
final hwndOwner = lockParentWindow ? GetForegroundWindow() : NULL;
hr = fileDialog.show(hwndOwner);
if (!SUCCEEDED(hr)) {
fileDialog.release();
CoUninitialize();

if (hr == HRESULT_FROM_WIN32(ERROR_CANCELLED)) {
Expand All @@ -154,7 +153,6 @@ class FilePickerWindows extends FilePicker {
hr = item.release();
if (!SUCCEEDED(hr)) throw WindowsException(hr);

hr = fileDialog.release();
CoUninitialize();

return Future.value(path);
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: 5.3.3
version: 5.3.4

dependencies:
flutter:
Expand Down

0 comments on commit 316e9d3

Please sign in to comment.