[commit] r1522 - trunk/GME/Mga

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Mon Sep 12 09:42:10 CDT 2011


Author: ksmyth
Date: Mon Sep 12 09:42:10 2011
New Revision: 1522

Log:
COM collections dont hold NULL pointers; use NULL collection instead

Modified:
   trunk/GME/Mga/MgaComplexOps.cpp

Modified: trunk/GME/Mga/MgaComplexOps.cpp
==============================================================================
--- trunk/GME/Mga/MgaComplexOps.cpp	Fri Sep  9 13:12:30 2011	(r1521)
+++ trunk/GME/Mga/MgaComplexOps.cpp	Mon Sep 12 09:42:10 2011	(r1522)
@@ -1147,8 +1147,11 @@
 		q->Add( CComPtr<IMgaFCO>( copiedobj));
 
 		CComPtr<IMgaMetaRoles> roles;
-		COMTHROW(roles.CoCreateInstance(L"Mga.MgaMetaRoles", NULL, CLSCTX_INPROC));
-		COMTHROW(roles->Append(CComPtr<IMgaMetaRole>(role)));
+		if (role)
+		{
+			COMTHROW(roles.CoCreateInstance(L"Mga.MgaMetaRoles", NULL, CLSCTX_INPROC));
+			COMTHROW(roles->Append(CComPtr<IMgaMetaRole>(role)));
+		}
 
 		CComPtr<IMgaFCOs> newfcos;
 		COMTHROW(CopyFCOs( q, roles, &newfcos));
@@ -1482,8 +1485,11 @@
 		q->Add( CComPtr<IMgaFCO>( movedobj));
 
 		CComPtr<IMgaMetaRoles> roles;
-		COMTHROW(roles.CoCreateInstance(L"Mga.MgaMetaRoles", NULL, CLSCTX_INPROC));
-		COMTHROW(roles->Append(CComPtr<IMgaMetaRole>(role)));
+		if (role)
+		{
+			COMTHROW(roles.CoCreateInstance(L"Mga.MgaMetaRoles", NULL, CLSCTX_INPROC));
+			COMTHROW(roles->Append(CComPtr<IMgaMetaRole>(role)));
+		}
 
 		CComPtr<IMgaFCOs> newfcos;
 		COMTHROW(MoveFCOs( q, roles, &newfcos));


More information about the gme-commit mailing list