location: Initialize permissions

The permissions hash is initialized after consulting the permission
store, however the lookup is skipped for requests that cannot be
resolved to an application, resulting in an error when accessing
the uninitialized hash for saving. Just make sure that the property
is always initialized to avoid that error.

https://bugzilla.gnome.org/show_bug.cgi?id=778661
This commit is contained in:
Florian Müllner 2017-02-15 11:47:45 +01:00
parent e08f2a4a04
commit fa82af251f

View File

@ -284,6 +284,7 @@ const AppAuthorizer = new Lang.Class({
this.reqAccuracyLevel = reqAccuracyLevel;
this._permStoreProxy = permStoreProxy;
this._maxAccuracyLevel = maxAccuracyLevel;
this._permissions = {};
this._accuracyLevel = GeoclueAccuracyLevel.NONE;
},