summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorHerbert Duerr [hdu] <duerr@sun.com>2010-03-17 10:38:47 +0100
committerHerbert Duerr [hdu] <duerr@sun.com>2010-03-17 10:38:47 +0100
commit9fd504900c9041079effc0a7f7a370089bf4a770 (patch)
tree4db59d0fb6150b22383459453168f7c6ebc879d3 /vcl
parentbaed90063d7108a5718881dd780e4aa32b1057a0 (diff)
#i110165# prevent NULL option for cairo_ft_font_options_substitute()
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/source/gdi/salgdi3.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/vcl/unx/source/gdi/salgdi3.cxx b/vcl/unx/source/gdi/salgdi3.cxx
index 0c1fcd7c77bd..d60f575ad674 100644
--- a/vcl/unx/source/gdi/salgdi3.cxx
+++ b/vcl/unx/source/gdi/salgdi3.cxx
@@ -1633,11 +1633,13 @@ void X11SalGraphics::GetDevFontSubstList( OutputDevice* )
void cairosubcallback( void* pPattern )
{
CairoWrapper& rCairo = CairoWrapper::get();
- if( rCairo.isValid() )
- {
+ if( !rCairo.isValid() )
+ return;
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
- rCairo.ft_font_options_substitute( rStyleSettings.GetCairoFontOptions(), pPattern);
- }
+ const void* pFontOptions = rStyleSettings.GetCairoFontOptions();
+ if( !pFontOptions )
+ return;
+ rCairo.ft_font_options_substitute( pFontOptions, pPattern );
}
bool GetFCFontOptions( const ImplFontAttributes& rFontAttributes, int nSize,