View | Details | Raw Unified | Return to issue 78961
Collapse All | Expand All

(-)dbaccess/source/core/dataaccess/databasedocument.cxx (+25 lines)
Lines 1087-1092 Link Here
1087
        // normally, nobody should explicitly dispose, but only XCloseable::close the document. And upon
1087
        // normally, nobody should explicitly dispose, but only XCloseable::close the document. And upon
1088
        // closing, our controllers are closed, too
1088
        // closing, our controllers are closed, too
1089
1089
1090
		// just in case...
1091
		if(!m_pImpl->m_aControllers.empty())
1092
		{
1093
			// We can't use an iterator here, since we are erasing from the
1094
			// vector as we go through it.
1095
			sal_Int32 aSize = m_pImpl->m_aControllers.size();
1096
			sal_Int32 aIndex;
1097
			for(aIndex = 0; aIndex < aSize; aIndex++)
1098
			{
1099
				Reference< XController > aController = m_pImpl->m_aControllers.front();
1100
1101
				// If the Controller exists, disconnect it, otherwise just erase
1102
				// it from the list.
1103
				if(aController.is())
1104
				{
1105
					disconnectController(aController);
1106
				}
1107
				else
1108
				{
1109
					ControllerArray::iterator aIter = m_pImpl->m_aControllers.begin();
1110
					m_pImpl->m_aControllers.erase(aIter);
1111
				}
1112
			}
1113
		}
1114
1090
    Reference< XModel > xHoldAlive( this );
1115
    Reference< XModel > xHoldAlive( this );
1091
    {
1116
    {
1092
        {
1117
        {

Return to issue 78961