diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2013-02-03 18:37:58 +0000 |
|---|---|---|
| committer | Johan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl> | 2013-02-03 18:37:58 +0000 |
| commit | c37431c37889fed55de3b8c76a0dc0569f0fe42d (patch) | |
| tree | 44b3d59d07ea09f2ac9833f6548985fb1af3cc71 /src/widgets | |
| parent | Allow simple font style changes even if first font-family in font list is not... (diff) | |
| download | inkscape-c37431c37889fed55de3b8c76a0dc0569f0fe42d.tar.gz inkscape-c37431c37889fed55de3b8c76a0dc0569f0fe42d.zip | |
fix crash
Fixed bugs:
- https://launchpad.net/bugs/1114243
(bzr r12094)
Diffstat (limited to 'src/widgets')
| -rw-r--r-- | src/widgets/font-selector.cpp | 4 | ||||
| -rw-r--r-- | src/widgets/text-toolbar.cpp | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/widgets/font-selector.cpp b/src/widgets/font-selector.cpp index b17dcf470..0f0e27746 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; diff --git a/src/widgets/text-toolbar.cpp b/src/widgets/text-toolbar.cpp index 9fdc1ea7b..f9921864c 100644 --- a/src/widgets/text-toolbar.cpp +++ b/src/widgets/text-toolbar.cpp @@ -238,7 +238,7 @@ static void sp_text_fontstyle_populate(GObject *tbl, font_instance *font=NULL) } // Select the style in the combo that best matches font - if (font) { + if (font && list) { unsigned int index = sp_font_selector_get_best_style(font, list); |
