diff --git a/OpenChange/MAPIStoreUserContext.m b/OpenChange/MAPIStoreUserContext.m index bc91f56b0..de3dfadf1 100644 --- a/OpenChange/MAPIStoreUserContext.m +++ b/OpenChange/MAPIStoreUserContext.m @@ -73,6 +73,8 @@ static NSMapTable *contextsTable = nil; [userContext autorelease]; [contextsTable setObject: userContext forKey: username]; } + else + [userContext activate]; return userContext; } diff --git a/SoObjects/SOGo/SOGoObject.m b/SoObjects/SOGo/SOGoObject.m index 3f3afcb9b..df5bc6afc 100644 --- a/SoObjects/SOGo/SOGoObject.m +++ b/SoObjects/SOGo/SOGoObject.m @@ -180,6 +180,9 @@ [NSException raise: NSInvalidArgumentException format: @"'_name' must not be an empty string"]; context = [[WOApplication application] context]; + if (!context) + [self errorWithFormat: @"Error: initializing a SOGoObject (named %@) " + @"without wocontext", _name]; nameInContainer = [_name copy]; container = _container; if ([self doesRetainContainer])