From dbe5f7429a96d756c8060d36b555f4d00b2980b3 Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Fri, 10 Jan 2014 16:11:43 +0100 Subject: [PATCH] One more check Signed-off-by: Sebastian Ramacher --- database-plain.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/database-plain.c b/database-plain.c index 2f1801f..22fc507 100644 --- a/database-plain.c +++ b/database-plain.c @@ -448,10 +448,16 @@ get_jumplist_from_str(const char* str) g_free(jump); break; } - jump->x = g_ascii_strtod(token, NULL); + token = strtok_r(NULL, " ", &saveptr); + if (token == NULL) { + girara_warning("Could not parse jumplist information."); + g_free(jump); + break; + } jump->y = g_ascii_strtod(token, NULL); + girara_list_append(result, jump); token = strtok_r(NULL, " ", &saveptr); }