summaryrefslogtreecommitdiff
path: root/pango/pango-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'pango/pango-utils.c')
-rw-r--r--pango/pango-utils.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/pango/pango-utils.c b/pango/pango-utils.c
index b4ad4511..3dfcebde 100644
--- a/pango/pango-utils.c
+++ b/pango/pango-utils.c
@@ -812,8 +812,14 @@ parse_int (const char *word,
int *out)
{
char *end;
- long val = strtol (word, &end, 10);
- int i = val;
+ long val;
+ int i;
+
+ if (word == NULL)
+ return FALSE;
+
+ val = strtol (word, &end, 10);
+ i = val;
if (end != word && *end == '\0' && val >= 0 && val == i)
{