summaryrefslogtreecommitdiffstats
path: root/src/widgets/font-selector.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2013-02-03 18:37:58 +0000
committerJohan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl>2013-02-03 18:37:58 +0000
commitc37431c37889fed55de3b8c76a0dc0569f0fe42d (patch)
tree44b3d59d07ea09f2ac9833f6548985fb1af3cc71 /src/widgets/font-selector.cpp
parentAllow simple font style changes even if first font-family in font list is not... (diff)
downloadinkscape-c37431c37889fed55de3b8c76a0dc0569f0fe42d.tar.gz
inkscape-c37431c37889fed55de3b8c76a0dc0569f0fe42d.zip
fix crash
Fixed bugs: - https://launchpad.net/bugs/1114243 (bzr r12094)
Diffstat (limited to 'src/widgets/font-selector.cpp')
-rw-r--r--src/widgets/font-selector.cpp4
1 files changed, 4 insertions, 0 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;