aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2009-06-10 01:34:35 +0800
committerWill Thompson <will.thompson@collabora.co.uk>2009-06-10 01:34:35 +0800
commitf31d0fbeda0c03a619c2db2a84ef3181c579649b (patch)
tree0021897e7f272794bf4451886cb49bcb4080d1af
parent08fb04d03b17c44e401d89cfd0e957c41cdf3b56 (diff)
downloadgsoc2013-empathy-f31d0fbeda0c03a619c2db2a84ef3181c579649b.tar
gsoc2013-empathy-f31d0fbeda0c03a619c2db2a84ef3181c579649b.tar.gz
gsoc2013-empathy-f31d0fbeda0c03a619c2db2a84ef3181c579649b.tar.bz2
gsoc2013-empathy-f31d0fbeda0c03a619c2db2a84ef3181c579649b.tar.lz
gsoc2013-empathy-f31d0fbeda0c03a619c2db2a84ef3181c579649b.tar.xz
gsoc2013-empathy-f31d0fbeda0c03a619c2db2a84ef3181c579649b.tar.zst
gsoc2013-empathy-f31d0fbeda0c03a619c2db2a84ef3181c579649b.zip
Correctly propagate Provide/Accept errors
Previously, if myerr was set as well as error, myerr was cleared, but not set to a copy of error. So then the function continued as normal, and crashed. Also, having checked if myerr is set, we should probably log the message from that, rather than from the (possibly NULL) error. :)
-rw-r--r--libempathy/empathy-tp-file.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libempathy/empathy-tp-file.c b/libempathy/empathy-tp-file.c
index 3a5826868..8b9b9a5e2 100644
--- a/libempathy/empathy-tp-file.c
+++ b/libempathy/empathy-tp-file.c
@@ -407,13 +407,14 @@ ft_operation_provide_or_accept_file_cb (TpChannel *proxy,
* report the method error.
*/
g_clear_error (&myerr);
- myerr = g_error_copy (error);
}
+
+ myerr = g_error_copy (error);
}
if (myerr != NULL)
{
- DEBUG ("Error: %s", error->message);
+ DEBUG ("Error: %s", myerr->message);
ft_operation_close_with_error (tp_file, myerr);
g_clear_error (&myerr);
return;