Merge pull request #498 from Unroll-Me/master
authorMarek Habersack <grendel@twistedcode.net>
Fri, 30 Nov 2012 09:59:01 +0000 (01:59 -0800)
committerMarek Habersack <grendel@twistedcode.net>
Fri, 30 Nov 2012 09:59:01 +0000 (01:59 -0800)
Fix HttpContextWrapper.Session when Session State is disabled

mcs/class/System.Web.Abstractions/System.Web/HttpContextWrapper.cs

index 66e99f2610616786a64eb56b06cf1a35646b2e95..22feb8530d7193050ee835f034ae9af5dd08beab 100644 (file)
@@ -127,7 +127,7 @@ namespace System.Web
                }
 
                public override HttpSessionStateBase Session {
-                       get { return new HttpSessionStateWrapper (w.Session); }
+                       get { return w.Session == null ? null : new HttpSessionStateWrapper (w.Session); }
                }
 
                public override bool SkipAuthorization {