summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/smtppass.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/smtppass.h b/common/smtppass.h
index 9dbe935..d10bed1 100644
--- a/common/smtppass.h
+++ b/common/smtppass.h
@@ -77,7 +77,7 @@ typedef struct spio
}
spio_t;
-#define spio_valid(io) ((io)->fd != -1)
+#define spio_valid(io) ((io) && (io)->fd != -1)
/* Setup the io structure (allocated elsewhere) */
void spio_init(spio_t* io, const char* name);