[commit] r2504 - trunk/GME/ConstraintManager

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Thu Jul 3 08:12:27 CDT 2014


Author: ksmyth
Date: Thu Jul  3 08:12:26 2014
New Revision: 2504

Log:
ConstraintManager: may be running not under GME.exe, need to check IGMEOLEApp for NULL

Modified:
   trunk/GME/ConstraintManager/GMEViolationDialog.cpp

Modified: trunk/GME/ConstraintManager/GMEViolationDialog.cpp
==============================================================================
--- trunk/GME/ConstraintManager/GMEViolationDialog.cpp	Thu Jul  3 08:12:18 2014	(r2503)
+++ trunk/GME/ConstraintManager/GMEViolationDialog.cpp	Thu Jul  3 08:12:26 2014	(r2504)
@@ -445,7 +445,8 @@
 				COMTHROW(bstr.AppendBSTR( nm));
 				COMTHROW(bstr.Append(_T("</A>: ")));
 				COMTHROW(bstr.Append(OclCommonEx::Convert(item.spConstraint.Ptr()->GetMessage())));
-				COMTHROW(m_oleapp->ConsoleMessage(bstr, MSG_ERROR));
+				if (m_oleapp)
+					COMTHROW(m_oleapp->ConsoleMessage(bstr, MSG_ERROR));
 			}
 			catch(hresult_exception &)// in case the constraint is not attached to any fco in the metamodel
 			{                         // the constraint becomes project scoped, thus QueryInterface fails
@@ -455,7 +456,8 @@
 				bstr.Append(_T(" Violated! Description: \""));
 				bstr.Append(OclCommonEx::Convert(item.spConstraint.Ptr()->GetMessage())); // FIXME suspect
 				bstr.Append(_T("\"."));
-				COMTHROW(m_oleapp->ConsoleMessage(bstr, MSG_ERROR));
+				if (m_oleapp)
+					COMTHROW(m_oleapp->ConsoleMessage(bstr, MSG_ERROR));
 			}
 		}
 		catch(hresult_exception &)


More information about the gme-commit mailing list