summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-03-31 17:04:28 +0200
committerMichael Stahl <mstahl@redhat.com>2015-03-31 20:08:34 +0200
commitb7fa07b07195799f385ccba0243611f71ffe0525 (patch)
treedae17777e7be79e21db6ac6f100d891857d8be21 /vcl
parent9857c6390212e16dd9f26b47b4afc5d33b5242ef (diff)
vcl: WinSalGraphics: don't crash if there's no font
The CairoTextRender::GetTextLayout() also handles non-existing fonts gracefully, so adapt this for consistency. Change-Id: I89cd9ad6aa64e3b320da83bd4290e4c0b57d08bc
Diffstat (limited to 'vcl')
-rw-r--r--vcl/win/source/gdi/winlayout.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 3e7bb08cb4b5..ad8b31986f7c 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -2711,7 +2711,9 @@ void GraphiteWinLayout::Simplify( bool is_base )
SalLayout* WinSalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel )
{
- DBG_ASSERT( mpWinFontEntry[nFallbackLevel], "WinSalGraphics mpWinFontEntry==NULL");
+ if (!mpWinFontEntry[nFallbackLevel]) return nullptr;
+
+ assert(mpWinFontData[nFallbackLevel]);
WinLayout* pWinLayout = NULL;