summaryrefslogtreecommitdiff
path: root/sot/source/sdstor/stgio.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sot/source/sdstor/stgio.cxx')
-rw-r--r--sot/source/sdstor/stgio.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/sot/source/sdstor/stgio.cxx b/sot/source/sdstor/stgio.cxx
index e41c3d356ce4..2a82c0731b52 100644
--- a/sot/source/sdstor/stgio.cxx
+++ b/sot/source/sdstor/stgio.cxx
@@ -105,20 +105,20 @@ void StgIo::SetupStreams()
m_pFAT = new StgFATStrm(*this, nFatStrmSize);
m_pTOC = new StgDirStrm(*this);
- if( !GetError() )
+ if( GetError() )
+ return;
+
+ StgDirEntry* pRoot = m_pTOC->GetRoot();
+ if( pRoot )
{
- StgDirEntry* pRoot = m_pTOC->GetRoot();
- if( pRoot )
- {
- m_pDataFAT = new StgDataStrm( *this, m_aHdr.GetDataFATStart(), -1 );
- m_pDataStrm = new StgDataStrm( *this, *pRoot );
- m_pDataFAT->SetIncrement( 1 << m_aHdr.GetPageSize() );
- m_pDataStrm->SetIncrement( GetDataPageSize() );
- m_pDataStrm->SetEntry( *pRoot );
- }
- else
- SetError( SVSTREAM_FILEFORMAT_ERROR );
+ m_pDataFAT = new StgDataStrm( *this, m_aHdr.GetDataFATStart(), -1 );
+ m_pDataStrm = new StgDataStrm( *this, *pRoot );
+ m_pDataFAT->SetIncrement( 1 << m_aHdr.GetPageSize() );
+ m_pDataStrm->SetIncrement( GetDataPageSize() );
+ m_pDataStrm->SetEntry( *pRoot );
}
+ else
+ SetError( SVSTREAM_FILEFORMAT_ERROR );
}
// get the logical data page size