aboutsummaryrefslogtreecommitdiffstats
path: root/ui/text_import.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui/text_import.c')
-rw-r--r--ui/text_import.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/text_import.c b/ui/text_import.c
index 7b40c49a50..d02b1bdcd6 100644
--- a/ui/text_import.c
+++ b/ui/text_import.c
@@ -319,6 +319,11 @@ parse_num (const char *str, int offset)
unsigned long num;
char *c;
+ if (str == NULL) {
+ fprintf(stderr, "FATAL ERROR: str is NULL\n");
+ exit(1);
+ }
+
num = strtoul(str, &c, offset ? offset_base : 16);
if (c==str) {
fprintf(stderr, "FATAL ERROR: Bad hex number? [%s]\n", str);