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