[commit] r2085 - trunk/GME/Mga
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Thu Oct 18 10:30:57 CDT 2012
Author: ksmyth
Date: Thu Oct 18 10:30:56 2012
New Revision: 2085
Log:
Fix crash when MgaAttribute::Release is called after AbortTransaction
Modified:
trunk/GME/Mga/MgaAttribute.cpp
trunk/GME/Mga/MgaAttribute.h
Modified: trunk/GME/Mga/MgaAttribute.cpp
==============================================================================
--- trunk/GME/Mga/MgaAttribute.cpp Thu Oct 18 10:30:45 2012 (r2084)
+++ trunk/GME/Mga/MgaAttribute.cpp Thu Oct 18 10:30:56 2012 (r2085)
@@ -983,8 +983,10 @@
CMgaPart::CMgaPart() : prevptr(NULL), next(NULL), load_status(ATTSTATUS_INVALID) { }
CMgaPart::~CMgaPart() { // remove object from hash
- if(next) next->prevptr = prevptr;
- *prevptr = next;
+ if (next)
+ next->prevptr = prevptr;
+ if (prevptr)
+ *prevptr = next;
}
void CMgaPart::Initialize(metaref_type mr, ::FCO *o, CMgaProject *p) { // Throws!!!
mref = mr;
Modified: trunk/GME/Mga/MgaAttribute.h
==============================================================================
--- trunk/GME/Mga/MgaAttribute.h Thu Oct 18 10:30:45 2012 (r2084)
+++ trunk/GME/Mga/MgaAttribute.h Thu Oct 18 10:30:56 2012 (r2085)
@@ -77,8 +77,10 @@
typedef CMgaAttribute *hashobp;
hashobp *prevptr, next;
~CMgaAttribute() { // remove object from hash
- if(next) next->prevptr = prevptr;
- *prevptr = next;
+ if (next)
+ next->prevptr = prevptr;
+ if (prevptr)
+ *prevptr = next;
}
void Initialize(metaref_type mr, FCO *o, CMgaProject *p); // Throws!!!
metaref_type mref;
@@ -132,7 +134,6 @@
void clear()
{
- size_t mref = 0;
for (size_t mref = 0; mref < sizeof(pool) / sizeof(pool[0]); mref++)
{
CMgaAttribute::hashobp *kk;
More information about the gme-commit
mailing list