[commit] r2626 - trunk/GME/Mga

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Wed Apr 13 14:04:30 CDT 2016


Author: ksmyth
Date: Wed Apr 13 14:04:30 2016
New Revision: 2626

Log:
Fix DetachFromArchetype crash

Modified:
   trunk/GME/Mga/MgaDeriveOps.cpp

Modified: trunk/GME/Mga/MgaDeriveOps.cpp
==============================================================================
--- trunk/GME/Mga/MgaDeriveOps.cpp	Wed Apr 13 13:08:47 2016	(r2625)
+++ trunk/GME/Mga/MgaDeriveOps.cpp	Wed Apr 13 14:04:30 2016	(r2626)
@@ -331,15 +331,17 @@
 		SelfMark(OBJEVENT_SUBT_INST);
 
 		// Need to run this check: "inherited ref can only refer to a derived instance of the target of its base"
-		CoreObjs segs = self[ATTRID_REFERENCE + ATTRID_COLLECTION];
-		ITERATE_THROUGH(segs) {
-			CComPtr<IMgaFCO> ffco;
-			ObjForCore(ITER)->getinterface(&ffco);
-			COMTHROW(ffco->Check());
+		{
+			CoreObjs segs = self[ATTRID_REFERENCE + ATTRID_COLLECTION];
+			ITERATE_THROUGH(segs) {
+				CComPtr<IMgaFCO> ffco;
+				ObjForCore(ITER)->getinterface(&ffco);
+				COMTHROW(ffco->Check());
+			}
 		}
 
 		CComPtr<IMgaFCO> selfFco;
-		ObjForCore(ITER)->getinterface(&selfFco);
+		ObjForCore(self)->getinterface(&selfFco);
 		COMTHROW(selfFco->Check());
 
 		CoreObjMark(self[ATTRID_PARENT], OBJEVENT_LOSTCHILD);


More information about the gme-commit mailing list