Commit cbc1844e authored by Paolo Bacchilega's avatar Paolo Bacchilega
Browse files

check whether gio_file is null before using it

parent f8b1898a
......@@ -247,7 +247,7 @@ new_library_dialog_response_cb (GtkWidget *dialog,
file_source = gth_main_get_file_source (parent);
gio_parent = gth_file_source_to_gio_file (file_source, parent);
gio_file = g_file_get_child_for_display_name (gio_parent, name, &error);
if (g_file_make_directory (gio_file, NULL, &error)) {
if ((gio_file != NULL) && g_file_make_directory (gio_file, NULL, &error)) {
GFile *file;
GList *list;
......
......@@ -428,7 +428,7 @@ new_library_dialog_response_cb (GtkWidget *dialog,
file_source = gth_main_get_file_source (parent);
gio_parent = gth_file_source_to_gio_file (file_source, parent);
gio_file = _g_directory_create_unique (gio_parent, name, "", &error);
if (g_file_make_directory (gio_file, NULL, &error)) {
if ((gio_file != NULL) && g_file_make_directory (gio_file, NULL, &error)) {
GFile *file;
GList *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