summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Barth <Christian.Barth@zoho.com>2017-06-26 21:08:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-28 09:20:40 +0200
commit89494fc501142f83a4ae387394d939d25252f796 (patch)
tree049576593a5e6caade7550559b9b4f0cad6f6f1e
parentd2d85921605415908c553e84db654628f9f0c0b1 (diff)
tdf#107880: Make use of ScopedVclPtr
Make the use of VclPtr<VirtualDevice> exception safe by using ScopedVclPtr<VirtualDevice> when disposeAndClear() is called in same method. Change-Id: I684eb7fb92c2bf16c30e74dce8e691dfca1a1f45 Signed-off-by: Christian Barth <Christian.Barth@zoho.com> Reviewed-on: https://gerrit.libreoffice.org/39321 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sw/source/core/view/viewsh.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 7cbcd8b4a689..a763e979ff88 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -326,7 +326,7 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd )
pRegion->Compress();
- VclPtr<VirtualDevice> pVout;
+ ScopedVclPtr<VirtualDevice> pVout;
while ( !pRegion->empty() )
{
SwRect aRect( pRegion->back() );
@@ -420,7 +420,6 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd )
lcl_PaintTransparentFormControls(*this, aRect); // i#107365
}
- pVout.disposeAndClear();
delete pRegion;
Imp()->DelRegion();
}