diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2013-02-06 08:19:53 +0000 |
|---|---|---|
| committer | Jabiertxo Arraiza Cenoz <jtx@jtx.marker.es> | 2013-02-06 08:19:53 +0000 |
| commit | 549a79b5367ffd259a23fbd18e93199d1c0149b7 (patch) | |
| tree | 9c4ce4a0217afa63b59f32d02a60b848f43a9520 /src/widgets/font-selector.cpp | |
| parent | Merge from branch (diff) | |
| parent | Supress Pango error message. (diff) | |
| download | inkscape-549a79b5367ffd259a23fbd18e93199d1c0149b7.tar.gz inkscape-549a79b5367ffd259a23fbd18e93199d1c0149b7.zip | |
Merge from branch
(bzr r11950.1.19)
Diffstat (limited to 'src/widgets/font-selector.cpp')
| -rw-r--r-- | src/widgets/font-selector.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/widgets/font-selector.cpp b/src/widgets/font-selector.cpp index b17dcf470..b0b4b5504 100644 --- a/src/widgets/font-selector.cpp +++ b/src/widgets/font-selector.cpp @@ -442,6 +442,10 @@ GtkWidget *sp_font_selector_new() */ unsigned int sp_font_selector_get_best_style (font_instance *font, GList *list) { + if ( !font || !list) { + return 0; + } + font_instance *tempFont = NULL; unsigned int currentStyleNumber = 0; unsigned int bestStyleNumber = 0; @@ -462,7 +466,9 @@ unsigned int sp_font_selector_get_best_style (font_instance *font, GList *list) tempFont = NULL; } - pango_font_description_unset_fields(bestMatchForFont, PANGO_FONT_MASK_SIZE); + if( bestMatchForFont != NULL ) { + pango_font_description_unset_fields(bestMatchForFont, PANGO_FONT_MASK_SIZE); + } list = list->next; |
