connectivity/source/drivers/ado/Awrapado.cxx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
New commits: commit d32878608ecfdeceaddb266ac69198ef69b62c12 Author: LuboÅ¡ LuÅák <l.lu...@suse.cz> Date: Sat Nov 3 16:17:50 2012 +0100 fix copy ctor Using operator= in a copy ctor is a rather bad idea when the operator= accesses uninitialized data members. diff --git a/connectivity/source/drivers/ado/Awrapado.cxx b/connectivity/source/drivers/ado/Awrapado.cxx index e760874..0853585 100644 --- a/connectivity/source/drivers/ado/Awrapado.cxx +++ b/connectivity/source/drivers/ado/Awrapado.cxx @@ -1561,6 +1561,13 @@ WpBase::WpBase(IDispatch* pInt) } } +WpBase::WpBase(const WpBase& aWrapper) + :pIUnknown(aWrapper.pIUnknown) +{ + if (pIUnknown) + pIUnknown->AddRef(); +} + //inline WpBase& WpBase::operator=(const WpBase& rhs) { @@ -1588,11 +1595,6 @@ WpBase& WpBase::operator=(IDispatch* rhs) return *this; } -WpBase::WpBase(const WpBase& aWrapper) -{ - operator=(aWrapper); -} - WpBase::~WpBase() { if (pIUnknown)
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits