summaryrefslogtreecommitdiff
path: root/vcl/source/outdev/map.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/outdev/map.cxx')
-rw-r--r--vcl/source/outdev/map.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx
index b359e504d0a9..e7eed8872143 100644
--- a/vcl/source/outdev/map.cxx
+++ b/vcl/source/outdev/map.cxx
@@ -232,9 +232,8 @@ static void ImplCalcMapResolution( const MapMode& rMapMode,
vcl::Window::ImplInitAppFontData( pSVData->maWinData.mpFirstFrame );
else
{
- WorkWindow* pWin = new WorkWindow( NULL, 0 );
+ ScopedVclPtrInstance<WorkWindow> pWin( nullptr, 0 );
vcl::Window::ImplInitAppFontData( pWin );
- delete pWin;
}
}
rMapRes.mnMapScNumX = pSVData->maGDIData.mnAppFontX;
@@ -343,6 +342,9 @@ inline void ImplCalcMapResolution( const MapMode& rMapMode,
// #i75163#
void OutputDevice::ImplInvalidateViewTransform()
{
+ if(!mpOutDevData)
+ return;
+
if(mpOutDevData->mpViewTransform)
{
delete mpOutDevData->mpViewTransform;