From f2f6d11e35cdd09291e730429d6c876532f34328 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Thu, 26 Jan 2017 23:38:12 -0500 Subject: tdf#102688: let's purge it here just in case... In theory it would still leak without this if the map mode is set multiple times. Change-Id: Ie862f4d59e45b92ff75dffb787ef256337f47f84 Reviewed-on: https://gerrit.libreoffice.org/33602 Tested-by: Jenkins Reviewed-by: Kohei Yoshida --- editeng/source/editeng/impedit2.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'editeng') diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 5bbb325cc854..7c6e51cd0109 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -208,6 +208,7 @@ void ImpEditEngine::SetRefMapMode( const MapMode& rMapMode ) if ( GetRefDevice()->GetMapMode() == rMapMode ) return; + mpOwnDev.disposeAndClear(); mpOwnDev = VclPtr::Create(); pRefDev = mpOwnDev; pRefDev->SetMapMode( MapUnit::MapTwip ); -- cgit