diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-04-06 17:25:52 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-04-07 01:13:34 +0300 |
commit | c4601c03eae7211b2648a2aa3df6cc3719170734 (patch) | |
tree | 498fec16c6283aa9c5f1555569f38d952d6dd11b | |
parent | ad69a033a796d7ed060446fc29721c07191441b0 (diff) |
Don't return in a (rare?) case without restoring the CGContext state stack
Change-Id: I89040b62c0961be160fcfaa793e48326fa7a584c
-rw-r--r-- | vcl/coretext/salcoretextlayout.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/coretext/salcoretextlayout.cxx b/vcl/coretext/salcoretextlayout.cxx index d33b134a3b74..fe7adabce8c4 100644 --- a/vcl/coretext/salcoretextlayout.cxx +++ b/vcl/coretext/salcoretextlayout.cxx @@ -162,7 +162,6 @@ void CoreTextLayout::DrawText( SalGraphics& rGraphics ) const if( mnCharCount <= 0 || !gr.CheckContext() ) return; - CGContextSaveGState( gr.mrContext ); Point pos = GetDrawPosition(Point(0,0)); SAL_INFO( "vcl.coretext.layout", "at pos (" << pos.X() << "," << pos.Y() <<") ctfont=" << mpStyle->GetFont() ); @@ -171,6 +170,7 @@ void CoreTextLayout::DrawText( SalGraphics& rGraphics ) const SAL_INFO( "vcl.coretext.layout", "Error cg_font is NULL" ); return; } + CGContextSaveGState( gr.mrContext ); CGContextSetFont(gr.mrContext, cg_font); CGContextSetFontSize(gr.mrContext, CTFontGetSize(mpStyle->GetFont())); CGContextSetTextDrawingMode(gr.mrContext, kCGTextFill); |