Skip to content
Snippets Groups Projects
Verified Commit 187451c9 authored by alex's avatar alex
Browse files

fix error when no file is selected in preferences setting

parent 6b964470
Branches
Tags
No related merge requests found
......@@ -140,7 +140,12 @@ on_file_set (
IDE_FILE_CHOOSER_ENTRY (gobject);
GFile * file = ide_file_chooser_entry_get_file (fc_entry);
char * str = g_file_get_path (file);
if (!file)
{
g_warning ("no file selected");
return;
}
char * str = g_file_get_path (file);
g_settings_set_string (data->info->settings, data->key, str);
g_free (str);
g_object_unref (file);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment