Skip to content

Commit 7cf99cb

Browse files
Avoid null reference exception when no regions are defined
No tests, because it would require an empty configuration file, which would prevent testing the nominal case, having regions defined. Fix #40
1 parent f76d167 commit 7cf99cb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

SysCache2/NHibernate.Caches.SysCache2/SysCacheProvider.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ static SysCacheProvider()
4343
}
4444
else
4545
{
46+
CacheRegionSettings = new Dictionary<string, CacheRegionElement>(0);
4647
Log.Info(
4748
"No cache regions specified. Cache regions can be specified in sysCache configuration section with custom settings.");
4849
}

0 commit comments

Comments
 (0)