From c7c385bb8e42d2051bcf05fd75b2146fe9852317 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 2 Oct 2014 10:15:29 +0100 Subject: coverity#1242904 error code overwritten Change-Id: Ie5dcc39f05d7fd21a873ac95ca9cc7f00c1961df --- sfx2/source/doc/sfxbasemodel.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 9975213bcd08..e6fcb91053d5 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -1884,7 +1884,8 @@ void SAL_CALL SfxBaseModel::load( const Sequence< beans::PropertyValue >& seqA m_pData->m_pObjectShell->PrepareSecondTryLoad_Impl(); if ( !m_pData->m_pObjectShell->DoLoad(pMedium) ) nError=ERRCODE_IO_GENERAL; - nError = m_pData->m_pObjectShell->GetErrorCode(); + if (m_pData->m_pObjectShell->GetErrorCode()) + nError = m_pData->m_pObjectShell->GetErrorCode(); } } -- cgit