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:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user