priv->dispose_run = TRUE;
- if (priv->contact) {
+ if (priv->contact != NULL) {
g_object_unref (priv->contact);
priv->contact = NULL;
}
- if (priv->gfile) {
+ if (priv->gfile != NULL) {
g_object_unref (priv->gfile);
priv->gfile = NULL;
}
- if (priv->tpfile) {
+ if (priv->tpfile != NULL) {
empathy_tp_file_close (priv->tpfile);
g_object_unref (priv->tpfile);
priv->tpfile = NULL;
}
- if (priv->cancellable) {
+ if (priv->cancellable != NULL) {
g_object_unref (priv->cancellable);
priv->cancellable = NULL;
}
}
out:
- if (error)
+ if (error != NULL)
hash_data->error = error;
g_io_scheduler_job_send_to_mainloop_async (job, hash_job_done,
hash_data->stream =
G_INPUT_STREAM (g_file_read (priv->gfile, cancellable, &error));
- if (error)
+ if (error != NULL)
{
hash_data->error = error;
g_io_scheduler_job_send_to_mainloop_async (job, hash_job_done,
{
CallbacksData *data = user_data;
- if (data->handler)
+ if (data->handler != NULL)
g_object_unref (data->handler);
g_slice_free (CallbacksData, data);
{
EmpathyTpFilePriv *priv = GET_PRIV (weak_object);
- if (error)
+ if (error != NULL)
{
/* set a default value for the state */
priv->state = TP_FILE_TRANSFER_STATE_NONE;
if (priv->is_closed)
return;
- else
- priv->is_closed = TRUE;
- if (priv->op_callback)
+ priv->is_closed = TRUE;
+
+ if (priv->op_callback != NULL)
priv->op_callback (tp_file, NULL, priv->op_user_data);
}
if (priv->is_closed)
return;
- else
- priv->is_closed = TRUE;
+
+ priv->is_closed = TRUE;
/* close the channel if it's not cancelled already */
if (priv->state != TP_FILE_TRANSFER_STATE_CANCELLED)
empathy_tp_file_cancel (tp_file);
- if (priv->op_callback)
+ if (priv->op_callback != NULL)
priv->op_callback (tp_file, error, priv->op_user_data);
}
priv->start_time = empathy_time_get_current ();
/* notify we're starting a transfer */
- if (priv->progress_callback)
+ if (priv->progress_callback != NULL)
priv->progress_callback (tp_file, 0, priv->progress_user_data);
if (priv->incoming)
return;
/* notify clients */
- if (priv->progress_callback)
+ if (priv->progress_callback != NULL)
priv->progress_callback (EMPATHY_TP_FILE (weak_object),
count, priv->progress_user_data);
}
g_cancellable_set_error_if_cancelled (priv->cancellable, &myerr);
- if (error)
+ if (error != NULL)
{
- if (myerr)
+ if (myerr != NULL)
{
/* if we were both cancelled and failed when calling the method,
* report the method error.
}
}
- if (myerr)
+ if (myerr != NULL)
{
DEBUG ("Error: %s", error->message);
ft_operation_close_with_error (tp_file, myerr);
priv->dispose_run = TRUE;
- if (priv->channel)
+ if (priv->channel != NULL)
{
g_signal_handlers_disconnect_by_func (priv->channel,
tp_file_invalidated_cb, object);
priv->channel = NULL;
}
- if (priv->in_stream)
+ if (priv->in_stream != NULL)
g_object_unref (priv->in_stream);
- if (priv->out_stream)
+ if (priv->out_stream != NULL)
g_object_unref (priv->out_stream);
- if (priv->cancellable)
+ if (priv->cancellable != NULL)
g_object_unref (priv->cancellable);
G_OBJECT_CLASS (empathy_tp_file_parent_class)->dispose (object);