From 47b5c7d7953345416b59ed8151083209dd8e0e4d Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Tue, 8 Jan 2008 09:07:43 +0000 Subject: [PATCH] * fix some runtime warning pmo-trunk-r3987 --- src/modest-mail-operation.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/modest-mail-operation.c b/src/modest-mail-operation.c index 48f3c14..7e95429 100644 --- a/src/modest-mail-operation.c +++ b/src/modest-mail-operation.c @@ -2547,13 +2547,18 @@ notify_progress_of_multiple_messages (ModestMailOperation *self, { ModestMailOperationPrivate *priv; ModestMailOperationState *state; - gboolean is_num_bytes; + gboolean is_num_bytes = FALSE; priv = MODEST_MAIL_OPERATION_GET_PRIVATE (self); /* We know that tinymail sends us information about - transferred bytes with this particular message */ - is_num_bytes = (g_ascii_strcasecmp (status->message, "Retrieving message") == 0); + * transferred bytes with this particular message + * + * (FIXME: this is very ugly, and no I (djcb) didn't write this code, + * I just added the 'if' so we don't get runtime warning) + */ + if (status->message) + is_num_bytes = (g_ascii_strcasecmp (status->message, "Retrieving message") == 0); state = modest_mail_operation_clone_state (self); if (is_num_bytes && !((status->position == 1) && (status->of_total == 100))) { -- 1.7.9.5