summaryrefslogtreecommitdiff
path: root/daemon/gvfsbackendftp.c
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@redhat.com>2011-08-15 14:46:03 +0200
committerTomas Bzatek <tbzatek@redhat.com>2011-08-15 14:46:03 +0200
commit4cec621168a9e79f639e59eebc9de677ef4a9180 (patch)
treed9ea976d24420646e146ae3760e932830cd8d142 /daemon/gvfsbackendftp.c
parentaac7f64a901ea4ef456fdfebcd7cbce18c998550 (diff)
downloadgvfs-4cec621168a9e79f639e59eebc9de677ef4a9180.tar.gz
ftp: Handle NULL progress_callback cases
Just be precautious as we already test for this on other places. Found by Coverity Scan analysis
Diffstat (limited to 'daemon/gvfsbackendftp.c')
-rw-r--r--daemon/gvfsbackendftp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/daemon/gvfsbackendftp.c b/daemon/gvfsbackendftp.c
index d24b2596..a715ec4d 100644
--- a/daemon/gvfsbackendftp.c
+++ b/daemon/gvfsbackendftp.c
@@ -1442,7 +1442,8 @@ ftp_output_stream_splice (GOutputStream *output,
g_cancellable_reset (timer_cancel);
current = cancellable;
g_clear_error (error);
- progress_callback (bytes_copied, total_size, progress_callback_data);
+ if (progress_callback)
+ progress_callback (bytes_copied, total_size, progress_callback_data);
continue;
}
else
@@ -1467,7 +1468,8 @@ ftp_output_stream_splice (GOutputStream *output,
g_cancellable_reset (timer_cancel);
current = cancellable;
g_clear_error (error);
- progress_callback (bytes_copied, total_size, progress_callback_data);
+ if (progress_callback)
+ progress_callback (bytes_copied, total_size, progress_callback_data);
continue;
}
else