From: Andrea Zagli Date: Sat, 2 Apr 2011 09:45:58 +0000 (+0200) Subject: Bugfix. X-Git-Tag: 0.1.6~5 X-Git-Url: https://saetta.ns0.it/gitweb?a=commitdiff_plain;h=7c660335bdceb78d466319818864da6cc501fd6f;p=libgtkform Bugfix. --- diff --git a/src/fielddatetime.c b/src/fielddatetime.c index d304094..504a823 100644 --- a/src/fielddatetime.c +++ b/src/fielddatetime.c @@ -390,7 +390,7 @@ gtk_form_field_datetime_set_as_origin (GtkFormField *field) priv->original_value = g_memdup (value, sizeof (struct tm)); - if (priv->type == GTK_FORM_FIELD_DATETIME_TYPE_DATE) + if (priv->original_value != NULL && priv->type == GTK_FORM_FIELD_DATETIME_TYPE_DATE) { priv->original_value->tm_hour = 0; priv->original_value->tm_min = 0;