summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx')
-rw-r--r--dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
index 2b6b3a42db34..af7ef4ec89a0 100644
--- a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
+++ b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
@@ -82,10 +82,10 @@ namespace dbaui
{
// search the position of our table window in the table window map
nIndex = m_pLine->GetParent()->GetTabWinMap().size();
- const ::std::vector<OTableConnection*>& rVec = m_pLine->GetParent()->getTableConnections();
- ::std::vector<OTableConnection*>::const_iterator aIter = rVec.begin();
- ::std::vector<OTableConnection*>::const_iterator aEnd = rVec.end();
- for (; aIter != aEnd && (*aIter) != m_pLine; ++nIndex,++aIter)
+ const auto& rVec = m_pLine->GetParent()->getTableConnections();
+ auto aIter = rVec.begin();
+ auto aEnd = rVec.end();
+ for (; aIter != aEnd && (*aIter).get() != m_pLine; ++nIndex,++aIter)
;
nIndex = ( aIter != aEnd ) ? nIndex : -1;
}
@@ -186,6 +186,7 @@ namespace dbaui
{
// clear vector
clearLineData();
+ m_pParent.clear();
vcl::Window::dispose();
}
bool OConnectionLineAccess::isEditable() const