summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/coretext/ctlayout.cxx6
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;