On Tuesday 16 of August 2011, cbosdonnat wrote:
> Caolán McNamara wrote:
> > On Thu, 2011-08-11 at 15:36 +0200, Cedric Bosdonnat wrote:
> Indeed that remembers me of a discussion like that with Lubos... though I'm
> not good enough in C++ to see those subtleties. I reverted the above
> mentioned patch and replaced it by
>
> http://cgit.freedesktop.org/libreoffice/core/commit/?id=c3852d41a419331277d
>0b98b02792f0bbf704d5b

> +SdrRectObj& SdrRectObj::operator=(const SdrRectObj& rCopy)
> +{
> +    if ( this == &rCopy )
> +        return *this;
> +
> +    SdrTextObj::operator=( rCopy );
> +
> +    if ( rCopy.mpXPoly )
> +        mpXPoly = new XPolygon( *rCopy.mpXPoly );

 This is not completely correct. This is not copy ctor, so mpXPoly does not 
have any default value, but instead whatever was there before the assignment. 
You need to handle the else case as well.

 If this is fixed, you have my ACK.

> +
> +    return *this;
> +}

>
> All is now working fine, and that later commit could be applied to 3.4
> safely.
-- 
 Lubos Lunak
 l.lu...@suse.cz
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to