From 9222ef71c86c08604708c6f0af56503229f241ac Mon Sep 17 00:00:00 2001
From: Robin Eklund <robi-ekl@dsv.su.se>
Date: Thu, 28 Jul 2011 15:30:31 +0200
Subject: [PATCH] Fixed non-resetting active project when switching users and
 the target users active project is null

---
 src/main/java/se/su/dsv/scipro/SciProSession.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/main/java/se/su/dsv/scipro/SciProSession.java b/src/main/java/se/su/dsv/scipro/SciProSession.java
index 3d9f1245e4..1389f3a15e 100644
--- a/src/main/java/se/su/dsv/scipro/SciProSession.java
+++ b/src/main/java/se/su/dsv/scipro/SciProSession.java
@@ -186,6 +186,8 @@ public class SciProSession extends WebSession {
 			Project activeProject = userSettings.getActiveProject();
 			if(activeProject != null)
 				activeProjectId = activeProject.getId();
+			else
+				activeProjectId = null;
 		}
 		else {
 			userSettings = new UserSettings(user);