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