[commit] r1475 - trunk/GME/Mga
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Tue Aug 23 14:38:26 CDT 2011
Author: ksmyth
Date: Tue Aug 23 14:38:26 2011
New Revision: 1475
Log:
Fix crash on Release after project->Close
Modified:
trunk/GME/Mga/MgaConnection.cpp
Modified: trunk/GME/Mga/MgaConnection.cpp
==============================================================================
--- trunk/GME/Mga/MgaConnection.cpp Tue Aug 23 13:47:15 2011 (r1474)
+++ trunk/GME/Mga/MgaConnection.cpp Tue Aug 23 14:38:26 2011 (r1475)
@@ -136,9 +136,14 @@
CMgaConnPoint::~CMgaConnPoint() {
MARKSIG('9');
- FCO::cphash::iterator ii = fco->connpointhash.find(cobj.GetObjID());
- ASSERT(ii != fco->connpointhash.end());
- fco->connpointhash.erase(ii);
+ // n.b. don't use GetObjId, it can COMTHROW when the project is closed
+ objid_type t;
+ HRESULT hr = cobj->get_ObjID(&t);
+ if (SUCCEEDED(hr)) {
+ FCO::cphash::iterator ii = fco->connpointhash.find(t);
+ ASSERT(ii != fco->connpointhash.end());
+ fco->connpointhash.erase(ii);
+ }
}
More information about the gme-commit
mailing list