From: <fab...@us...> - 2008-07-25 06:37:17
|
Revision: 3664 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=3664&view=rev Author: fabiomaulo Date: 2008-07-25 06:37:25 +0000 (Fri, 25 Jul 2008) Log Message: ----------- Prevent unmanaged exception. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Impl/CriteriaImpl.cs Modified: trunk/nhibernate/src/NHibernate/Impl/CriteriaImpl.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Impl/CriteriaImpl.cs 2008-07-25 06:15:55 UTC (rev 3663) +++ trunk/nhibernate/src/NHibernate/Impl/CriteriaImpl.cs 2008-07-25 06:37:25 UTC (rev 3664) @@ -507,8 +507,8 @@ // remap the orders foreach (OrderEntry orderEntry in IterateOrderings()) { - ICriteria currentParent = newParents[orderEntry.Criteria]; - if (currentParent == null) + ICriteria currentParent; + if (!newParents.TryGetValue(orderEntry.Criteria, out currentParent)) { throw new AssertionFailure( "Could not find parent for order in the previous criteria. If you see this error, it is a bug"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |