* src/modest-mail-operation.c:
[modest] / src / modest-mail-operation.c
index 19274c6..70b0bdb 100644 (file)
@@ -417,7 +417,8 @@ modest_mail_operation_cancel (ModestMailOperation *self)
        /* Cancel the mail operation. We need to wrap it between this
           start/stop operations to allow following calls to the
           account */
-       tny_account_cancel (priv->account);
+       if (priv->account)
+               tny_account_cancel (priv->account);
 
        return canceled;
 }