Commit 37403103 authored by Paolo Bacchilega's avatar Paolo Bacchilega Committed by Paolo Bacchilega

create a temp variable t store the current line. (process_output,

2005-04-16  Paolo Bacchilega  <paobac@cvs.gnome.org>

        * src/fr-process.c (process_error, process_output): create a temp
        variable t store the current line.
        (process_output, process_error): Attemp to fix bug #164894.
parent f6d3ad1e
2005-04-16 Paolo Bacchilega <paobac@cvs.gnome.org>
* src/fr-process.c (process_error, process_output): create a temp
variable t store the current line.
(process_output, process_error): Attemp to fix bug #164894.
2005-04-15 Paolo Bacchilega <paobac@cvs.gnome.org>
* src/window.c (window_rename_selection): do not ask anything,
......
......@@ -239,11 +239,14 @@ process_line__common (char *line,
gpointer data)
{
FRCommand *comm = FR_COMMAND (data);
char *local_line;
if (line == NULL)
return;
fr_command_message (comm, line);
local_line = g_strdup (line);
fr_command_message (comm, local_line);
g_free (local_line);
if (comm->n_files != 0) {
double fraction = (double) comm->n_file++ / comm->n_files;
......
......@@ -468,8 +468,11 @@ process_output (FRProcess *fr_proc)
fr_proc->raw_output = g_list_prepend (fr_proc->raw_output,
g_strdup (line));
if (fr_proc->o_proc_line_func != NULL)
(*fr_proc->o_proc_line_func) (line, fr_proc->o_proc_line_data);
if ((fr_proc->o_proc_line_func != NULL) && (line != NULL)) {
char *tmp_line = g_strdup (line);
(*fr_proc->o_proc_line_func) (tmp_line, fr_proc->o_proc_line_data);
g_free (tmp_line);
}
line = eol + 1;
}
......@@ -510,8 +513,11 @@ process_error (FRProcess *fr_proc)
fr_proc->raw_error = g_list_prepend (fr_proc->raw_error,
g_strdup (line));
if (fr_proc->e_proc_line_func != NULL)
(*fr_proc->e_proc_line_func) (line, fr_proc->e_proc_line_data);
if ((fr_proc->e_proc_line_func != NULL) && (line != NULL)) {
char *tmp_line = g_strdup (line);
(*fr_proc->e_proc_line_func) (tmp_line, fr_proc->e_proc_line_data);
g_free (tmp_line);
}
line = eol + 1;
}
......
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