Commit f8fc0d9f by Jan-Derk de Vries Committed by GitHub

Hotfix - requesting location after being granted results in memory error (#635)

* Hotfix bug where requesting location after being granted would result into a memory error.

* Update permission_handler/CHANGELOG.md

Co-authored-by: Maurits van Beusekom <maurits@vnbskm.nl>

Co-authored-by: Maurits van Beusekom <maurits@vnbskm.nl>
parent 8c77c8f6
## 8.1.4+1
* Fix a bug where after allowing the `location` permission and requesting it again would lead to a memory error.
## 8.1.4 ## 8.1.4
* Fix bug where requesting `locationAlways` permission sometimes returns `PermissionStatus.Denied` instead of `PermissionStatus.Granted`. * Fix bug where requesting `locationAlways` permission sometimes returns `PermissionStatus.Denied` instead of `PermissionStatus.Granted`.
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
if (status != PermissionStatusDenied) { if (status != PermissionStatusDenied) {
completionHandler(status); completionHandler(status);
return;
} }
if (@available(iOS 9.0, *)) { if (@available(iOS 9.0, *)) {
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
// don't do anything and continue requesting permissions // don't do anything and continue requesting permissions
} else if (status != PermissionStatusDenied) { } else if (status != PermissionStatusDenied) {
completionHandler(status); completionHandler(status);
return;
} }
_permissionStatusHandler = completionHandler; _permissionStatusHandler = completionHandler;
......
name: permission_handler name: permission_handler
description: Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions. description: Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions.
version: 8.1.4 version: 8.1.4+1
homepage: https://github.com/baseflowit/flutter-permission-handler homepage: https://github.com/baseflowit/flutter-permission-handler
flutter: flutter:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment