[libgda] Bug fix in GdauiEntryCommonTime
- From: Vivien Malerba <vivien src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libgda] Bug fix in GdauiEntryCommonTime
- Date: Sun, 13 Sep 2009 13:25:00 +0000 (UTC)
commit 42b6aa5deebaa1fcf0543a7dc1ef18002ff3ec65
Author: Vivien Malerba <malerba gnome-db org>
Date: Wed Sep 9 21:16:27 2009 +0200
Bug fix in GdauiEntryCommonTime
libgda-ui/data-entries/gdaui-entry-common-time.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/libgda-ui/data-entries/gdaui-entry-common-time.c b/libgda-ui/data-entries/gdaui-entry-common-time.c
index 5f6031b..ac4da6b 100644
--- a/libgda-ui/data-entries/gdaui-entry-common-time.c
+++ b/libgda-ui/data-entries/gdaui-entry-common-time.c
@@ -413,7 +413,8 @@ real_get_value (GdauiEntryWrapper *mgwrap)
else if (type == GDA_TYPE_TIME) {
str2 = gdaui_format_entry_get_text (GDAUI_FORMAT_ENTRY (mgtim->priv->entry_time));
value = gda_data_handler_get_value_from_str (dh, str2, type);
- if (mgtim->priv->last_value_set &&
+ if (value && (G_VALUE_TYPE (value) != GDA_TYPE_NULL) &&
+ mgtim->priv->last_value_set &&
gda_value_isa (mgtim->priv->last_value_set, GDA_TYPE_TIME)) {
/* copy the 'timezone' part, we we have not modified */
const GdaTime *dgatime_set = gda_value_get_time (mgtim->priv->last_value_set);
@@ -435,9 +436,10 @@ real_get_value (GdauiEntryWrapper *mgwrap)
g_free (tmpstr2);
value = gda_data_handler_get_value_from_str (dh, str2, type);
g_free (str2);
- if (mgtim->priv->last_value_set &&
+ if (value && (G_VALUE_TYPE (value) != GDA_TYPE_NULL) &&
+ mgtim->priv->last_value_set &&
gda_value_isa (mgtim->priv->last_value_set, GDA_TYPE_TIMESTAMP)) {
- /* copy the 'fraction' and 'timezone' parts, we we have not modified */
+ /* copy the 'fraction' and 'timezone' parts, we have not modified */
const GdaTimestamp *dgatime_set = gda_value_get_timestamp (mgtim->priv->last_value_set);
GdaTimestamp *gdatime = g_new (GdaTimestamp, 1);
*gdatime = *(gda_value_get_timestamp (value));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]