There are ocassions (are they even valid?) in which ic->status
might be NULL, so we check for that before trying to access
ic->status->text when calling g_set_error ().
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=639717
if (ic->error != NULL) {
g_propagate_error (&cw->error, ic->error);
ic->error = NULL;
- } else
+ } else {
+ if (ic->status == NULL)
+ /* FIXME: why is ic->status == NULL here? It shouldn't happen. */
+ g_debug ("imapx_command_select_done: ic->status is NULL.");
g_set_error (
&cw->error, CAMEL_IMAPX_ERROR, 1,
"SELECT %s failed: %s",
camel_folder_get_full_name (cw->select),
- ic->status->text? ic->status->text:"<unknown reason>");
+ ic->status && ic->status->text? ic->status->text:"<unknown reason>");
+ }
cw->complete (is, cw);
cw = cn;
cn = cn->next;