diff options
author | Tor Lillqvist <tml@collabora.com> | 2018-10-02 18:26:41 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2018-10-02 21:12:07 +0300 |
commit | 4e1b526f35abe6a0a01edaa72f9134cb878d4945 (patch) | |
tree | e687d85eba8afafb6870c36c6f966d8591b14c1b /vcl | |
parent | baddd90d4ac0af1efe8bd09f3993d2b2f48d62b6 (diff) |
We shouldn't call DrawTextLayout() without a context on iOS
Change-Id: I3e72909ca1aa9f97721d982f16624f496152ae2d
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/quartz/salgdi.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx index 43ca506220c9..36569d626d3b 100644 --- a/vcl/quartz/salgdi.cxx +++ b/vcl/quartz/salgdi.cxx @@ -393,6 +393,14 @@ bool AquaSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangl void AquaSalGraphics::DrawTextLayout(const GenericSalLayout& rLayout) { +#ifdef IOS + if (!CheckContext()) + { + SAL_WARN("vcl.cg", "AquaSalGraphics::DrawTextLayout() without context"); + return; + } +#endif + const CoreTextStyle& rStyle = *static_cast<const CoreTextStyle*>(&rLayout.GetFont()); const FontSelectPattern& rFontSelect = rStyle.GetFontSelectPattern(); if (rFontSelect.mnHeight == 0) |