summaryrefslogtreecommitdiff
path: root/vcl/source/app
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2014-05-08 00:02:48 +1000
committerTor Lillqvist <tml@collabora.com>2014-05-07 17:27:08 +0000
commitd32b2863be915999472485b1df21c21e84448ea5 (patch)
tree7a2ecb05378572f0e370c794441d0a12fdd62cdd /vcl/source/app
parent09555ce045934ead76d71fc3681015786a5ff2ff (diff)
Handle non-initialized pImplSVData in InitAppFontData
If pSVData->maWinData.mpFirstFrame is null in Application::InitAppFontData() then we need to create a new WorkWindow. Change-Id: I6665ff6525321554c8fd4943ec623978ce35f168 Reviewed-on: https://gerrit.libreoffice.org/9272 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'vcl/source/app')
-rw-r--r--vcl/source/app/svapp.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 5177aa177ce8..a750ad03d8f8 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1659,6 +1659,9 @@ void Application::InitAppFontData()
Window *pWindow = pSVData->mpDefaultWin;
+ if (!pWindow)
+ pWindow = new WorkWindow( NULL, 0 );
+
long nTextHeight = pWindow->GetTextHeight();
long nTextWidth = pWindow->approximate_char_width() * 8;
long nSymHeight = nTextHeight*4;
@@ -1698,6 +1701,10 @@ void Application::InitAppFontData()
pSVData->maGDIData.mnRealAppFontX = pSVData->maGDIData.mnAppFontX;
if ( pSVData->maAppData.mnDialogScaleX )
pSVData->maGDIData.mnAppFontX += (pSVData->maGDIData.mnAppFontX*pSVData->maAppData.mnDialogScaleX)/100;
+
+ // a temporary WorkWindow was created, we need to delete it
+ if (!pSVData->mpDefaultWin && pWindow)
+ delete pWindow;
}