summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/inc/RelationTableView.hxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-05-26 10:57:26 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-05-26 14:32:38 +0000
commit2436bdd9aa937fd9964655548932ac7c1caed258 (patch)
tree6100174a0814ea5cdb75f43ea7a05051360c2ece /dbaccess/source/ui/inc/RelationTableView.hxx
parentef82ce4eb97b3c1572f777a762d0648a24081c08 (diff)
Resolves: tdf#97854 crash on deleting inner join relationship
seems to be a regression from... commit 356bc0f697299e5fb6156ce25dc69845eaa6f9e6 Author: Michael Meeks <michael.meeks@collabora.com> Date: Wed Jul 1 19:03:55 2015 +0100 tdf#92434 - fix iteration, and remember to disposeAndClear. which is part of the VclPtr stuff so hold the connection by VclPtr when removing it from m_vTableConnection and only call dispose on it when _bDelete is true, not always. Change-Id: I38e65c6928499dc1e8bbf6b71e9901a4eaa5d913 (cherry picked from commit e55f83e1731e1031c63d8463b57c434cceb126e3) plus (easier to read as individual commits) Related: tdf#97854 confirm that on !bDelete there's a ref to the connection so that its not deleted on removal from the vector Change-Id: I6c1f7691ee415abf0f419fdd7fcf2341fe2bd1f3 (cherry picked from commit 3185d9b8fbaad56fc7170a277569b5e441d946f4) Reviewed-on: https://gerrit.libreoffice.org/25509 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'dbaccess/source/ui/inc/RelationTableView.hxx')
-rw-r--r--dbaccess/source/ui/inc/RelationTableView.hxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/dbaccess/source/ui/inc/RelationTableView.hxx b/dbaccess/source/ui/inc/RelationTableView.hxx
index aef883609645..28f45f6e0000 100644
--- a/dbaccess/source/ui/inc/RelationTableView.hxx
+++ b/dbaccess/source/ui/inc/RelationTableView.hxx
@@ -37,7 +37,7 @@ namespace dbaui
::rtl::Reference< comphelper::OContainerListenerAdapter> m_pContainerListener;
bool m_bInRemove;
- virtual void ConnDoubleClicked( OTableConnection* pConnection ) override;
+ virtual void ConnDoubleClicked(VclPtr<OTableConnection>& rConnection) override;
virtual void AddTabWin(const OUString& _rComposedName, const OUString& rWinName, bool bNewTable = false) override;
virtual VclPtr<OTableWindow> createWindow(const TTableWindowData::value_type& _pData) override;
@@ -58,7 +58,7 @@ namespace dbaui
virtual void RemoveTabWin( OTableWindow* pTabWin ) override;
virtual void AddConnection(const OJoinExchangeData& jxdSource, const OJoinExchangeData& jxdDest) override;
- virtual bool RemoveConnection(OTableConnection* pConn,bool _bDelete) override;
+ virtual bool RemoveConnection(VclPtr<OTableConnection>& rConn, bool _bDelete) override;
virtual void ReSync() override;