Commit 062df6bd authored by Michael Natterer's avatar Michael Natterer 😴

Bug 772025 - Incomplete toolrc file causes GIMP to hang

gimp_tools_restore(): print the error message when parsing toolrc fails.
parent e1db3636
......@@ -274,7 +274,7 @@ gimp_tools_restore (Gimp *gimp)
g_print ("Parsing '%s'\n", gimp_file_get_utf8_name (file));
if (gimp_config_deserialize_gfile (GIMP_CONFIG (gimp_list), file,
NULL, NULL))
NULL, &error))
{
gint n = gimp_container_get_n_children (gimp->tool_info_list);
gint i;
......@@ -299,6 +299,13 @@ gimp_tools_restore (Gimp *gimp)
}
}
}
else
{
if (error->code != G_IO_ERROR_NOT_FOUND)
gimp_message_literal (gimp, NULL, GIMP_MESSAGE_WARNING, error->message);
g_clear_error (&error);
}
g_object_unref (file);
g_object_unref (gimp_list);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment