2a0107994d92eaa14bc0fcf31dc22d779e984fd4
diff --git a/libsoup/soup-date.c b/libsoup/soup-date.c
index 8d690eb..7cd4535 100644
--- a/libsoup/soup-date.c
+++ b/libsoup/soup-date.c
@@ -544,6 +544,8 @@ soup_date_to_time_t (SoupDate *date)
 	time_t tt;
 	GTimeVal val;
 
+	g_return_val_if_fail (date != NULL, 0);
+
 	/* FIXME: offset, etc */
 
 	if (date->year < 1970)
