Check if there is json_content to parse at all
This commit is contained in:
parent
a6c9b73442
commit
1e15abe27c
1 changed files with 2 additions and 2 deletions
|
@ -1463,8 +1463,8 @@ midori_speeddial_import_from_json (const gchar* json_file,
|
|||
GKeyFile* key_file = g_key_file_new ();
|
||||
|
||||
g_file_get_contents (json_file, &json_content, NULL, NULL);
|
||||
parts = g_strsplit (json_content, ",", -1);
|
||||
while (parts[i] != NULL)
|
||||
parts = g_strsplit (json_content ? json_content : "", ",", -1);
|
||||
while (parts && parts[i] != NULL)
|
||||
{
|
||||
gchar* key;
|
||||
gchar* val;
|
||||
|
|
Loading…
Reference in a new issue