[gnumeric] Fonts: avoid critical on font mapping
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Fonts: avoid critical on font mapping
- Date: Wed, 29 Oct 2014 21:03:52 +0000 (UTC)
commit 644e51c662fcc65043390a66df22703b3811a658
Author: Morten Welinder <terra gnome org>
Date: Wed Oct 29 17:03:15 2014 -0400
Fonts: avoid critical on font mapping
ChangeLog | 4 ++++
src/style.c | 4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d20925b..2d79910 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-10-28 Morten Welinder <terra gnome org>
+
+ * src/style.c (find_font): Accept NULL font name.
+
2014-10-27 Morten Welinder <terra gnome org>
* src/sheet.c (sheet_destroy_contents): Plug leak from fuzzed
diff --git a/src/style.c b/src/style.c
index d6f1c75..d768af0 100644
--- a/src/style.c
+++ b/src/style.c
@@ -80,6 +80,10 @@ static struct FontInfo *
find_font (const char *font_name)
{
unsigned ui;
+
+ if (!font_name)
+ return NULL;
+
for (ui = 0; ui < G_N_ELEMENTS (font_info); ui++) {
if (!g_ascii_strcasecmp (font_info[ui].font_name, font_name))
return font_info + ui;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]