d1a811
--- poppler-20.11.0/glib/poppler-attachment.cc
d1a811
+++ poppler-20.11.0/glib/poppler-attachment.cc
d1a811
@@ -114,17 +114,21 @@ PopplerAttachment *_poppler_attachment_n
d1a811
         if (embFile->createDate()) {
d1a811
             priv->ctime = _poppler_convert_pdf_date_to_date_time(embFile->createDate());
d1a811
             G_GNUC_BEGIN_IGNORE_DEPRECATIONS
d1a811
-            /* This will overflow on dates from after 2038. This field is
d1a811
-             * deprecated, only kept for backward compatibility. */
d1a811
-            attachment->ctime = (GTime)g_date_time_to_unix(priv->ctime);
d1a811
+            if (priv->ctime != NULL) {
d1a811
+                /* This will overflow on dates from after 2038. This field is
d1a811
+                 * deprecated, only kept for backward compatibility. */
d1a811
+                attachment->ctime = (GTime)g_date_time_to_unix(priv->ctime);
d1a811
+            }
d1a811
             G_GNUC_END_IGNORE_DEPRECATIONS
d1a811
         }
d1a811
         if (embFile->modDate()) {
d1a811
             priv->mtime = _poppler_convert_pdf_date_to_date_time(embFile->modDate());
d1a811
             G_GNUC_BEGIN_IGNORE_DEPRECATIONS
d1a811
-            /* This will overflow on dates from after 2038. This field is
d1a811
-             * deprecated, only kept for backward compatibility. */
d1a811
-            attachment->mtime = (GTime)g_date_time_to_unix(priv->mtime);
d1a811
+            if (priv->mtime != NULL) {
d1a811
+                /* This will overflow on dates from after 2038. This field is
d1a811
+                 * deprecated, only kept for backward compatibility. */
d1a811
+                attachment->mtime = (GTime)g_date_time_to_unix(priv->mtime);
d1a811
+            }
d1a811
             G_GNUC_END_IGNORE_DEPRECATIONS
d1a811
         }
d1a811