summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/source/stream/stream.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index a0160348dff7..8fe25c28d055 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -1674,11 +1674,8 @@ void SvMemoryStream::SetBuffer( void* pNewBuf, std::size_t nCount,
{
SetBufferSize( 0 ); // Init buffering in the base class
Seek( 0 );
- if( bOwnsData )
- {
- if( pNewBuf != pBuf )
- FreeMemory();
- }
+ if( bOwnsData && pNewBuf != pBuf )
+ FreeMemory();
pBuf = static_cast<sal_uInt8 *>(pNewBuf);
nPos = 0;