tdf#120703 PVS: Silence V522 warnings

V522 There might be dereferencing of a potential null pointer.

Change-Id: Ie617b41a8f8d334022cf5313b242a236baedba48
Reviewed-on: https://gerrit.libreoffice.org/70017
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index bffd841..533029f 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -396,7 +396,8 @@
    uno::Reference<ui::XSidebar> xSidebar = getSidebarFromModel(getModel());
    if (xSidebar.is())
    {
        sfx2::sidebar::SidebarController* pSidebar = dynamic_cast<sfx2::sidebar::SidebarController*>(xSidebar.get());
        assert(dynamic_cast<sfx2::sidebar::SidebarController*>(xSidebar.get()));
        auto pSidebar = static_cast<sfx2::sidebar::SidebarController*>(xSidebar.get());
        sfx2::sidebar::SidebarController::registerSidebarForFrame(pSidebar, this);
        pSidebar->updateModel(getModel());
        css::lang::EventObject aEvent;
diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx
index 71f9f02..a8148e3 100644
--- a/chart2/source/controller/main/ChartController_TextEdit.cxx
+++ b/chart2/source/controller/main/ChartController_TextEdit.cxx
@@ -174,9 +174,9 @@
        const SfxItemSet* pSet = pDlg->GetOutputItemSet();
        const SfxPoolItem* pItem=nullptr;
        OUString aString;
        if ( pSet && pSet->GetItemState( SID_CHARMAP, true, &pItem) == SfxItemState::SET &&
             dynamic_cast< const SfxStringItem* >(pItem) !=  nullptr )
                aString = dynamic_cast<const SfxStringItem*>(pItem)->GetValue();
        if (pSet && pSet->GetItemState(SID_CHARMAP, true, &pItem) == SfxItemState::SET)
            if (auto pStringItem = dynamic_cast<const SfxStringItem*>(pItem))
                aString = pStringItem->GetValue();

        OutlinerView* pOutlinerView = m_pDrawViewWrapper->GetTextEditOutlinerView();
        SdrOutliner*  pOutliner = m_pDrawViewWrapper->getOutliner();
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index d2c7dfbd..06e870d 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -852,7 +852,8 @@
                            m_xUndoManager );

                        bool bChanged = false;
                        ChartModel* pModel = dynamic_cast<ChartModel*>(getModel().get());
                        assert(dynamic_cast<ChartModel*>(getModel().get()));
                        ChartModel* pModel = static_cast<ChartModel*>(getModel().get());
                        if ( eObjectType == OBJECTTYPE_LEGEND )
                            bChanged = DiagramHelper::switchDiagramPositioningToExcludingPositioning( *pModel, false , true );

diff --git a/cli_ure/source/uno_bridge/cli_data.cxx b/cli_ure/source/uno_bridge/cli_data.cxx
index 722536a..16f7047 100644
--- a/cli_ure/source/uno_bridge/cli_data.cxx
+++ b/cli_ure/source/uno_bridge/cli_data.cxx
@@ -1330,7 +1330,7 @@
                            {
                                void * p= ((uno_Sequence *) seq.get())->elements +
                                    (nPos * element_td.get()->nSize);
                                System::Object^ elemData= dynamic_cast<System::Array^>(cli_data)->GetValue(nPos);
                                System::Object^ elemData= safe_cast<System::Array^>(cli_data)->GetValue(nPos);
                                map_to_uno(
                                    p, elemData, element_td.get()->pWeakRef,
                                    false /* no assign */);
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx
index 4b3face..0dcd8a0 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -527,8 +527,9 @@
                out << "0";
                break;
            case codemaker::UnoType::Sort::Enum:
                assert(dynamic_cast<unoidl::EnumTypeEntity*>(ent.get()));
                out << codemaker::cpp::scopedCppName(u2b(n)) << "_"
                    << (dynamic_cast< unoidl::EnumTypeEntity * >(ent.get())->
                    << (static_cast<unoidl::EnumTypeEntity*>(ent.get())->
                        getMembers()[0].name);
                break;
            case codemaker::UnoType::Sort::String:
diff --git a/cppu/source/uno/copy.hxx b/cppu/source/uno/copy.hxx
index 79c738f..b0811b5 100644
--- a/cppu/source/uno/copy.hxx
+++ b/cppu/source/uno/copy.hxx
@@ -21,6 +21,7 @@

#include "prim.hxx"
#include "constr.hxx"
#include <cassert>
#include <cstdlib>

namespace cppu
@@ -138,6 +139,7 @@
            pDestAny->pData = &pDestAny->pReserved;
        else
            pDestAny->pData = std::malloc( sizeof(sal_Int64) );
        assert(pDestAny->pData);
        *static_cast<sal_Int64 *>(pDestAny->pData) = *static_cast<sal_Int64 *>(pSource);
        break;
    case typelib_TypeClass_FLOAT:
@@ -145,6 +147,7 @@
            pDestAny->pData = &pDestAny->pReserved;
        else
            pDestAny->pData = std::malloc( sizeof(float) );
        assert(pDestAny->pData);
        *static_cast<float *>(pDestAny->pData) = *static_cast<float *>(pSource);
        break;
    case typelib_TypeClass_DOUBLE:
@@ -152,6 +155,7 @@
            pDestAny->pData = &pDestAny->pReserved;
        else
            pDestAny->pData = std::malloc( sizeof(double) );
        assert(pDestAny->pData);
        *static_cast<double *>(pDestAny->pData) = *static_cast<double *>(pSource);
        break;
    case typelib_TypeClass_STRING:
@@ -297,6 +301,7 @@
                    pDestAny->pData = &pDestAny->pReserved;
                else
                    pDestAny->pData = std::malloc( sizeof(sal_Int64) );
                assert(pDestAny->pData);
                *static_cast<sal_Int64 *>(pDestAny->pData) = 0;
                break;
            case typelib_TypeClass_FLOAT:
@@ -304,6 +309,7 @@
                    pDestAny->pData = &pDestAny->pReserved;
                else
                    pDestAny->pData = std::malloc( sizeof(float) );
                assert(pDestAny->pData);
                *static_cast<float *>(pDestAny->pData) = 0.0;
                break;
            case typelib_TypeClass_DOUBLE:
@@ -311,6 +317,7 @@
                    pDestAny->pData = &pDestAny->pReserved;
                else
                    pDestAny->pData = std::malloc( sizeof(double) );
                assert(pDestAny->pData);
                *static_cast<double *>(pDestAny->pData) = 0.0;
                break;
            case typelib_TypeClass_STRING:
diff --git a/drawinglayer/source/primitive2d/baseprimitive2d.cxx b/drawinglayer/source/primitive2d/baseprimitive2d.cxx
index 9646add..17ad2de 100644
--- a/drawinglayer/source/primitive2d/baseprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/baseprimitive2d.cxx
@@ -219,14 +219,8 @@

            const BasePrimitive2D* pA(dynamic_cast< const BasePrimitive2D* >(rxA.get()));
            const BasePrimitive2D* pB(dynamic_cast< const BasePrimitive2D* >(rxB.get()));
            const bool bAEqualZero(pA == nullptr);

            if(bAEqualZero != (pB == nullptr))
            {
                return false;
            }

            if(bAEqualZero)
            if (!pA || !pB)
            {
                return false;
            }
diff --git a/drawinglayer/source/primitive3d/baseprimitive3d.cxx b/drawinglayer/source/primitive3d/baseprimitive3d.cxx
index 828e4fd..3e18440 100644
--- a/drawinglayer/source/primitive3d/baseprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/baseprimitive3d.cxx
@@ -166,14 +166,8 @@

            const BasePrimitive3D* pA(dynamic_cast< const BasePrimitive3D* >(rxA.get()));
            const BasePrimitive3D* pB(dynamic_cast< const BasePrimitive3D* >(rxB.get()));
            const bool bAEqualZero(pA == nullptr);

            if(bAEqualZero != (pB == nullptr))
            {
                return false;
            }

            if(bAEqualZero)
            if(!pA || !pB)
            {
                return false;
            }
diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index 020a5a3..b5369c2 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -617,6 +617,7 @@
    CPPUNIT_ASSERT_EQUAL( sal_Int32(13), aURLFieldInfo1.aPosition.nIndex );
    CPPUNIT_ASSERT_EQUAL( sal_uInt16(EE_FEATURE_FIELD), aURLFieldInfo1.pFieldItem->Which() );
    SvxURLField* pURLField1 = dynamic_cast<SvxURLField*> ( const_cast<SvxFieldData*> (aURLFieldInfo1.pFieldItem->GetField()) );
    CPPUNIT_ASSERT(pURLField1);
    CPPUNIT_ASSERT_EQUAL( aURL1, pURLField1->GetURL() );
    CPPUNIT_ASSERT_EQUAL( aRepres1, pURLField1->GetRepresentation() );

@@ -625,6 +626,7 @@
    CPPUNIT_ASSERT_EQUAL( sal_Int32(21), aURLFieldInfo2.aPosition.nIndex );
    CPPUNIT_ASSERT_EQUAL( sal_uInt16(EE_FEATURE_FIELD), aURLFieldInfo2.pFieldItem->Which() );
    SvxURLField* pURLField2 = dynamic_cast<SvxURLField*> ( const_cast<SvxFieldData*> (aURLFieldInfo2.pFieldItem->GetField()) );
    CPPUNIT_ASSERT(pURLField2);
    CPPUNIT_ASSERT_EQUAL( aURL2, pURLField2->GetURL() );
    CPPUNIT_ASSERT_EQUAL( aRepres2, pURLField2->GetRepresentation() );

@@ -652,6 +654,7 @@
    CPPUNIT_ASSERT_EQUAL( sal_Int32(13), aACPURLFieldInfo1.aPosition.nIndex );
    CPPUNIT_ASSERT_EQUAL( sal_uInt16(EE_FEATURE_FIELD), aACPURLFieldInfo1.pFieldItem->Which() );
    SvxURLField* pACPURLField1 = dynamic_cast<SvxURLField*> ( const_cast<SvxFieldData*> (aACPURLFieldInfo1.pFieldItem->GetField()) );
    CPPUNIT_ASSERT(pACPURLField1);
    CPPUNIT_ASSERT_EQUAL( aURL1, pACPURLField1->GetURL() );
    CPPUNIT_ASSERT_EQUAL( aRepres1, pACPURLField1->GetRepresentation() );

@@ -660,6 +663,7 @@
    CPPUNIT_ASSERT_EQUAL( sal_Int32(21), aACPURLFieldInfo2.aPosition.nIndex );
    CPPUNIT_ASSERT_EQUAL( sal_uInt16(EE_FEATURE_FIELD), aACPURLFieldInfo2.pFieldItem->Which() );
    SvxURLField* pACPURLField2 = dynamic_cast<SvxURLField*> ( const_cast<SvxFieldData*> (aACPURLFieldInfo2.pFieldItem->GetField()) );
    CPPUNIT_ASSERT(pACPURLField2);
    CPPUNIT_ASSERT_EQUAL( aURL2, pACPURLField2->GetURL() );
    CPPUNIT_ASSERT_EQUAL( aRepres2, pACPURLField2->GetRepresentation() )    ;

@@ -668,6 +672,7 @@
    CPPUNIT_ASSERT_EQUAL( sal_Int32(38), aACPURLFieldInfo3.aPosition.nIndex );
    CPPUNIT_ASSERT_EQUAL( sal_uInt16(EE_FEATURE_FIELD), aACPURLFieldInfo3.pFieldItem->Which() );
    SvxURLField* pACPURLField3 = dynamic_cast<SvxURLField*> ( const_cast<SvxFieldData*> (aACPURLFieldInfo3.pFieldItem->GetField()) );
    CPPUNIT_ASSERT(pACPURLField3);
    CPPUNIT_ASSERT_EQUAL( aURL1, pACPURLField3->GetURL() );
    CPPUNIT_ASSERT_EQUAL( aRepres1, pACPURLField3->GetRepresentation() );
}
diff --git a/javaunohelper/source/bootstrap.cxx b/javaunohelper/source/bootstrap.cxx
index 442dd00..8d593ce 100644
--- a/javaunohelper/source/bootstrap.cxx
+++ b/javaunohelper/source/bootstrap.cxx
@@ -55,6 +55,7 @@
    jsize len = jni_env->GetStringLength( jstr );
    rtl_uString * ustr =
        static_cast<rtl_uString *>(std::malloc( sizeof (rtl_uString) + (len * sizeof (sal_Unicode)) ));
    assert(ustr);
    jni_env->GetStringRegion( jstr, 0, len, reinterpret_cast<jchar *>(ustr->buffer) );
    OSL_ASSERT( !jni_env->ExceptionCheck() );
    ustr->refCount = 1;
diff --git a/sal/osl/w32/backtrace.cxx b/sal/osl/w32/backtrace.cxx
index 160d4e7..9e31616 100644
--- a/sal/osl/w32/backtrace.cxx
+++ b/sal/osl/w32/backtrace.cxx
@@ -55,6 +55,7 @@

    SYMBOL_INFO  * pSymbol;
    pSymbol = static_cast<SYMBOL_INFO *>(calloc( sizeof( SYMBOL_INFO ) + 1024 * sizeof( char ), 1 ));
    assert(pSymbol);
    pSymbol->MaxNameLen = 1024 - 1;
    pSymbol->SizeOfStruct = sizeof( SYMBOL_INFO );

@@ -99,6 +100,7 @@

    SYMBOL_INFO  * pSymbol;
    pSymbol = static_cast<SYMBOL_INFO *>(calloc( sizeof( SYMBOL_INFO ) + 1024 * sizeof( char ), 1 ));
    assert(pSymbol);
    pSymbol->MaxNameLen = 1024 - 1;
    pSymbol->SizeOfStruct = sizeof( SYMBOL_INFO );
    HANDLE hProcess = GetCurrentProcess();
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index f25d6bb..5f165aa 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -4483,8 +4483,9 @@
                break;
            case SC_CAT_MOVE:
                {
                    const ScChangeActionMove* pMove = dynamic_cast< const ScChangeActionMove* >( pAction );
                    OSL_ENSURE( pMove, "ScChangeTrack::Clone: pMove is null!" );
                    assert(dynamic_cast<const ScChangeActionMove*>(pAction)
                           && "ScChangeTrack::Clone: pMove is null!");
                    auto pMove = static_cast<const ScChangeActionMove*>(pAction);

                    pClonedAction = new ScChangeActionMove(
                        pAction->GetActionNumber(),
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index 6b46dd4..de01966 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -124,9 +124,9 @@
    get(pBtnCancel,"cancel");

    ScTabViewShell* pScViewSh = dynamic_cast<ScTabViewShell*>( SfxViewShell::Current()  );
    ScDocShell*     pScDocSh  = dynamic_cast<ScDocShell*>(     SfxObjectShell::Current()  );

    OSL_ENSURE( pScDocSh, "Current DocumentShell not found :-(" );
    SfxObjectShell* pSfxObjSh = SfxObjectShell::Current();
    assert(dynamic_cast<ScDocShell*>(pSfxObjSh) && "Current DocumentShell not found :-(");
    ScDocShell* pScDocSh = static_cast<ScDocShell*>(pSfxObjSh);

    pDoc = &pScDocSh->GetDocument();

diff --git a/soltools/cpp/_tokens.c b/soltools/cpp/_tokens.c
index cb0beec..c095ca6 100644
--- a/soltools/cpp/_tokens.c
+++ b/soltools/cpp/_tokens.c
@@ -17,6 +17,7 @@
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */

#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -217,6 +218,7 @@

    trp->max = 3 * trp->max / 2 + 1;
    trp->bp = (Token *) realloc(trp->bp, trp->max * sizeof(Token));
    assert(trp->bp); // realloc failure is OOM -> no point to handle
    trp->lp = &trp->bp[nlast];
    trp->tp = &trp->bp[ncur];
    return trp->lp;
diff --git a/sw/source/core/access/accfrmobj.cxx b/sw/source/core/access/accfrmobj.cxx
index 3057d22..5923eb1 100644
--- a/sw/source/core/access/accfrmobj.cxx
+++ b/sw/source/core/access/accfrmobj.cxx
@@ -244,11 +244,11 @@
    }
    else if( mpDrawObj )
    {
        SwDrawContact const*const pContact(dynamic_cast<SwDrawContact const*>(::GetUserCall(mpDrawObj)));
        const SwContact* const pContact = ::GetUserCall(mpDrawObj);
        // assume that a) the SwVirt* objects that don't have this are handled
        // by the mpFrame case above b) for genuine SdrObject this must be set
        // if it's connected to layout
        assert(pContact);
        assert(dynamic_cast<SwDrawContact const*>(pContact));
        SwPageFrame const*const pPage(const_cast<SwAnchoredObject *>(
            pContact->GetAnchoredObj(mpDrawObj))->FindPageFrameOfAnchor());
        if (pPage) // may end up here with partial layout -> not visible
diff --git a/sw/source/core/crsr/annotationmark.cxx b/sw/source/core/crsr/annotationmark.cxx
index 280193f..7ba754b 100644
--- a/sw/source/core/crsr/annotationmark.cxx
+++ b/sw/source/core/crsr/annotationmark.cxx
@@ -56,8 +56,9 @@
        SwTextField *const pTextField = pTextNode->GetFieldTextAttrAt(
            GetMarkEnd().nContent.GetIndex()-1, true);
        assert(pTextField != nullptr);
        const SwPostItField* pPostItField = dynamic_cast< const SwPostItField* >(pTextField->GetFormatField().GetField());
        assert(pPostItField != nullptr);
        const SwField* pField = pTextField->GetFormatField().GetField();
        assert(dynamic_cast<const SwPostItField*>(pField));
        const SwPostItField* pPostItField = static_cast<const SwPostItField*>(pField);
        // use the annotation mark's name as the annotation name, if
        // - the annotation field has an empty annotation name or
        // - the annotation mark's name differs (on mark creation a name clash had been detected)
diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx
index 3feaa1e..cb7ec4c 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -582,8 +582,9 @@
        const sal_Int32 nLen = static_cast<sal_Int32>(std::max<sal_Int32>( 0, ( (*End()) - 1 - nIdx ) ));
        const OUString aNewFieldContent = GetTextNode().GetExpandText(nullptr, nIdx, nLen);

        const SwInputField* pInputField = dynamic_cast<const SwInputField*>(GetFormatField().GetField());
        assert(pInputField != nullptr);
        const SwField* pField = GetFormatField().GetField();
        assert(dynamic_cast<const SwInputField*>(pField));
        const SwInputField* pInputField = static_cast<const SwInputField*>(pField);
        const_cast<SwInputField*>(pInputField)->applyFieldContent( aNewFieldContent );
        // trigger update of fields for scenarios in which the Input Field's content is part of e.g. a table formula
        GetTextNode().GetDoc()->getIDocumentFieldsAccess().GetUpdateFields().SetFieldsDirty(true);
@@ -623,8 +624,9 @@

::sw::mark::IMark* SwTextAnnotationField::GetAnnotationMark() const
{
    const SwPostItField* pPostItField = dynamic_cast<const SwPostItField*>(GetFormatField().GetField());
    assert(pPostItField != nullptr);
    const SwField* pField = GetFormatField().GetField();
    assert(dynamic_cast<const SwPostItField*>(pField));
    const SwPostItField* pPostItField = static_cast<const SwPostItField*>(pField);

    SwDoc* pDoc = static_cast<const SwPostItFieldType*>(pPostItField->GetTyp())->GetDoc();
    assert(pDoc != nullptr);
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 0288b37..9e52c5b 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -323,9 +323,8 @@
            SfxViewShell* pViewShell = pShell->GetViewShell();
            if(pViewShell)
            {
                if( nullptr!= dynamic_cast<SwView*>(pViewShell) )
                if ((pNewView = dynamic_cast<SwView*>(pViewShell)))
                {
                    pNewView = dynamic_cast< SwView* >(pViewShell);
                    pNewView->GetViewFrame()->GetFrame().Appear();
                }
                else
diff --git a/unodevtools/source/skeletonmaker/cpptypemaker.cxx b/unodevtools/source/skeletonmaker/cpptypemaker.cxx
index 21c336b..92a2db0 100644
--- a/unodevtools/source/skeletonmaker/cpptypemaker.cxx
+++ b/unodevtools/source/skeletonmaker/cpptypemaker.cxx
@@ -64,8 +64,9 @@

    if (defaultvalue && referenceType == 16) {
        if (sort == codemaker::UnoType::Sort::Enum) {
            assert(dynamic_cast<unoidl::EnumTypeEntity *>(entity.get()));
            o << nucleus.copy(nucleus.lastIndexOf('.') + 1) << "_"
              << dynamic_cast< unoidl::EnumTypeEntity * >(entity.get())->
              << static_cast<unoidl::EnumTypeEntity*>(entity.get())->
                getMembers()[0].name;
        }
        return;
@@ -926,9 +927,10 @@
                o << "; construction methods:\n";
                printConstructors(o, options, manager, nucleus);
            }
            assert(dynamic_cast<unoidl::SingleInterfaceBasedServiceEntity*>(entity.get()));
            generateDocumentation(
                o, options, manager,
                u2b(dynamic_cast< unoidl::SingleInterfaceBasedServiceEntity * >(
                u2b(static_cast<unoidl::SingleInterfaceBasedServiceEntity*>(
                        entity.get())->getBase()),
                delegate);
            break;
diff --git a/winaccessibility/source/service/AccFrameEventListener.cxx b/winaccessibility/source/service/AccFrameEventListener.cxx
index 8f7a6bc..cf1968d 100644
--- a/winaccessibility/source/service/AccFrameEventListener.cxx
+++ b/winaccessibility/source/service/AccFrameEventListener.cxx
@@ -85,8 +85,8 @@
        {
            XAccessible* pAcc = xChild.get();

            VCLXWindow* pvclwindow =
                dynamic_cast<VCLXWindow*>(m_xAccessible.get());
            assert(dynamic_cast<VCLXWindow*>(m_xAccessible.get()));
            VCLXWindow* pvclwindow = static_cast<VCLXWindow*>(m_xAccessible.get());
            const SystemEnvData* systemdata
                = pvclwindow->GetWindow()->GetSystemData();

diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx b/winaccessibility/source/service/AccObjectWinManager.cxx
index 90714de..72774cf 100644
--- a/winaccessibility/source/service/AccObjectWinManager.cxx
+++ b/winaccessibility/source/service/AccObjectWinManager.cxx
@@ -111,9 +111,8 @@

    if ( pRetIMAcc && lParam == OBJID_CLIENT )
    {
        IAccessible* pTemp = dynamic_cast<IAccessible*>( pRetIMAcc );
        LRESULT result = LresultFromObject(IID_IAccessible, wParam, pTemp);
        pTemp->Release();
        LRESULT result = LresultFromObject(IID_IAccessible, wParam, pRetIMAcc);
        pRetIMAcc->Release();
        return result;
    }
    return 0;