diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-06-04 16:56:16 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-06-04 17:23:14 +0300 |
commit | 35b0a4cd274c1567cf0b8067eb01f17b82ee9f35 (patch) | |
tree | d25fd76c5e524432ea2ebf4f9760aab6b0222b5f /vcl | |
parent | 15e31ae2c3aa1e22e3936743fc0b9a1977e24de2 (diff) |
Avoid crash on iOS: We need to get a valid context here
Change-Id: Ib3fc01213fc6bc370a6c8b774a063f6f275ba6f2
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/coretext/ctlayout.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/coretext/ctlayout.cxx b/vcl/coretext/ctlayout.cxx index 64728fc9877e..a5915d9e663e 100644 --- a/vcl/coretext/ctlayout.cxx +++ b/vcl/coretext/ctlayout.cxx @@ -417,6 +417,12 @@ void CTLayout::GetCaretPositions( int nMaxIndex, sal_Int32* pCaretXArray ) const bool CTLayout::GetBoundRect( SalGraphics& rGraphics, Rectangle& rVCLRect ) const { AquaSalGraphics& rAquaGraphics = static_cast<AquaSalGraphics&>(rGraphics); + +#ifdef IOS + if( !rAquaGraphics.CheckContext() ) + return false; +#endif + CGRect aMacRect = CTLineGetImageBounds( mpCTLine, rAquaGraphics.mrContext ); CGPoint aMacPos = CGContextGetTextPosition( rAquaGraphics.mrContext ); aMacRect.origin.x -= aMacPos.x; |