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. :)
* 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;