Kaydet (Commit) e6fd5873 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#705516 Dereference null return value

Change-Id: I026e543ef2887276f6cd72109038e888f72eafab
üst 532cd8a2
...@@ -160,7 +160,8 @@ void SwDocShell::ToggleBrowserMode(sal_Bool bSet, SwView* _pView ) ...@@ -160,7 +160,8 @@ void SwDocShell::ToggleBrowserMode(sal_Bool bSet, SwView* _pView )
pTempView->SetPrinter( GetDoc()->getPrinter( false ), SFX_PRINTER_PRINTER | SFX_PRINTER_JOBSETUP ); pTempView->SetPrinter( GetDoc()->getPrinter( false ), SFX_PRINTER_PRINTER | SFX_PRINTER_JOBSETUP );
GetDoc()->CheckDefaultPageFmt(); GetDoc()->CheckDefaultPageFmt();
SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this, sal_False); SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this, sal_False);
do { while (pTmpFrm)
{
if( pTmpFrm != pTempView->GetViewFrame() ) if( pTmpFrm != pTempView->GetViewFrame() )
{ {
pTmpFrm->DoClose(); pTmpFrm->DoClose();
...@@ -168,8 +169,7 @@ void SwDocShell::ToggleBrowserMode(sal_Bool bSet, SwView* _pView ) ...@@ -168,8 +169,7 @@ void SwDocShell::ToggleBrowserMode(sal_Bool bSet, SwView* _pView )
} }
else else
pTmpFrm = pTmpFrm->GetNext(*pTmpFrm, this, sal_False); pTmpFrm = pTmpFrm->GetNext(*pTmpFrm, this, sal_False);
}
} while ( pTmpFrm );
const SwViewOption& rViewOptions = *pTempView->GetWrtShell().GetViewOptions(); const SwViewOption& rViewOptions = *pTempView->GetWrtShell().GetViewOptions();
pTempView->GetWrtShell().CheckBrowseView( sal_True ); pTempView->GetWrtShell().CheckBrowseView( sal_True );
pTempView->CheckVisArea(); pTempView->CheckVisArea();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment