https://issues.apache.org/ooo/show_bug.cgi?id=113608

--- Comment #9 from Andre <[email protected]> ---
You found the root cause for mpImpl being NULL.  Very good.

If you replace the lines

    uno::Reference< uno::XInterface > xShape( maWeakUnoShape );  // zhangjf
    if (!xShape.is()&& mpSvxShape)                               // zhangjf
        return NULL;                                         // zhangjf

    return mpSvxShape;

with

    if (mpSvxShape!=NULL && maWeakUnoShape.get() == NULL)
        return NULL;
    else
        return mpSvxShape;

then the whole thing becomes even clearer and a little faster (no type
conversion of xShape).

Maybe it would be even better to remove the const attribute from the
getSvxShape() method and set mpSvxShape to NULL when the weak pointer is gone. 
This might prevent errors in other scenarios.
What do you think?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to