Make sure AppdDomain.PermissionSet doesn't return null
authorJb Evain <jbevain@gmail.com>
Wed, 15 Dec 2010 17:35:18 +0000 (18:35 +0100)
committerJb Evain <jbevain@gmail.com>
Wed, 15 Dec 2010 17:35:29 +0000 (18:35 +0100)
mcs/class/corlib/System/AppDomain.cs

index 881b64d99a9b640cab4661c177b8eee3ecc81b51..b73252f49c0275e100d93650332bb3385c0bcdf6 100644 (file)
@@ -226,7 +226,7 @@ namespace System {
 
 #if NET_4_0
                public PermissionSet PermissionSet {
-                       get { return this.GrantedPermissionSet; }
+                       get { return _granted ?? (_granted = new PermissionSet (PermissionState.Unrestricted)); }
                }
 #endif