Avoid premature deletion of objects in ODatabaseContext::m_aDatabaseObjects.

Access of deleted objects found with valgrind/memcheck of dbaccess/qa/unoapi.
This commit is contained in:
Stephan Bergmann
2011-09-19 15:49:25 +02:00
parent 0803f08bb1
commit c9b1cb5ae3

View File

@@ -291,7 +291,10 @@ void ODatabaseContext::disposing()
++aIter
)
{
aIter->second->dispose();
rtl::Reference< ODatabaseModelImpl > obj(aIter->second);
// make sure obj is acquired and does not delete itself from within
// dispose()
obj->dispose();
}
m_aDatabaseObjects.clear();
}