[libgda/LIBGDA_4.2] Virtual connection correction



commit 7dd64aebe04949c60107cccc34785fc9d0fb8488
Author: Vivien Malerba <malerba gnome-db org>
Date:   Mon Apr 18 22:05:19 2011 +0200

    Virtual connection correction

 libgda/sqlite/virtual/gda-vprovider-data-model.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/libgda/sqlite/virtual/gda-vprovider-data-model.c b/libgda/sqlite/virtual/gda-vprovider-data-model.c
index e6754cb..61a8098 100644
--- a/libgda/sqlite/virtual/gda-vprovider-data-model.c
+++ b/libgda/sqlite/virtual/gda-vprovider-data-model.c
@@ -713,10 +713,14 @@ virtualRowid (sqlite3_vtab_cursor *cur, sqlite_int64 *pRowid)
 			GValue *gvalue;
 			cvalue = gda_data_model_iter_get_value_at (cursor->iter, i);
 			gvalue = gda_row_get_value (grow, i);
-			if (G_VALUE_TYPE (cvalue) != GDA_TYPE_NULL) {
-				g_value_init (gvalue, G_VALUE_TYPE (cvalue));
-				g_value_copy (cvalue, gvalue);
-			}
+			if (cvalue) {
+				if (G_VALUE_TYPE (cvalue) != GDA_TYPE_NULL) {
+					g_value_init (gvalue, G_VALUE_TYPE (cvalue));
+					g_value_copy (cvalue, gvalue);
+				}
+ 			}
+			else
+				gda_row_invalidate_value (grow, gvalue);
 		}
 		
 		hid = g_new (gint64, 1);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]