summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-01 13:14:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-08 07:37:40 +0100
commit7f48fa8152bd3320af7276d811b752c5a762dcce (patch)
treea95f2aec74a17050e825eb78833ee8f0274cb728 /tools
parenttdf#119648 - even if we fail to import a fontwork, we shouldn't crash. (diff)
downloadcore-7f48fa8152bd3320af7276d811b752c5a762dcce.tar.gz
core-7f48fa8152bd3320af7276d811b752c5a762dcce.zip
loplugin:collapseif in tools..xmloff
Change-Id: Iea1227a9f13a0a618d9bb6b0bbedaa5ce8d1a4f5 Reviewed-on: https://gerrit.libreoffice.org/62732 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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;