mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix Test for filepath is NULL when cancel pressed for export
This commit is contained in:
@@ -1537,10 +1537,12 @@ gnc_get_export_filename (SCM choice)
|
||||
filepath = gnc_file_dialog (gnc_ui_get_main_window (NULL),
|
||||
title, NULL, default_dir, GNC_FILE_DIALOG_EXPORT);
|
||||
|
||||
/* Try to test for extension on file name, add if missing */
|
||||
if (g_strrstr(filepath, ".") == NULL)
|
||||
filepath = g_strconcat(filepath, ".", g_ascii_strdown(type, strlen(type)), NULL);
|
||||
|
||||
if (filepath != NULL) // test for cancel pressed
|
||||
{
|
||||
/* Try to test for extension on file name, add if missing */
|
||||
if (g_strrstr(filepath, ".") == NULL)
|
||||
filepath = g_strconcat(filepath, ".", g_ascii_strdown(type, strlen(type)), NULL);
|
||||
}
|
||||
g_free (type);
|
||||
g_free (title);
|
||||
g_free (default_dir);
|
||||
|
||||
Reference in New Issue
Block a user