]> saetta.ns0.it Git - libgtkform/commitdiff
Bugfix.
authorAndrea Zagli <azagli@libero.it>
Sat, 2 Apr 2011 09:45:58 +0000 (11:45 +0200)
committerAndrea Zagli <azagli@libero.it>
Sat, 2 Apr 2011 09:45:58 +0000 (11:45 +0200)
src/fielddatetime.c

index d3040943af1591103e3b08b8ed93d3e4a52cce23..504a82368a6f053680b3d464e358abf03557b69a 100644 (file)
@@ -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;