Fix bug with segfault when we tried to create new file in an external editor (by pressing shift-F4)

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
Victor Ananjevsky 2013-06-13 14:09:29 +03:00 committed by Slava Zanko
parent 9d081bec5a
commit 6a83ddacd3
1 changed files with 8 additions and 4 deletions

View File

@ -633,12 +633,16 @@ execute_external_editor_or_viewer (const char *command, const vfs_path_t * filen
char **argv_cmd_options;
int argv_count;
g_shell_parse_argv (extern_cmd_options, &argv_count, &argv_cmd_options, NULL);
if (g_shell_parse_argv (extern_cmd_options, &argv_count, &argv_cmd_options, NULL))
{
do_executev (command, EXECUTE_INTERNAL, argv_cmd_options);
g_strfreev (argv_cmd_options);
}
else
do_executev (command, EXECUTE_INTERNAL, NULL);
g_free (extern_cmd_options);
do_executev (command, EXECUTE_INTERNAL, argv_cmd_options);
g_strfreev (argv_cmd_options);
}
execute_cleanup_with_vfs_arg (filename_vpath, &localcopy_vpath, &mtime);