[libgda/LIBGDA_4.2] Small correction to GdaConnection
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda/LIBGDA_4.2] Small correction to GdaConnection
- Date: Wed, 31 Aug 2011 19:59:21 +0000 (UTC)
commit 27a753d2398174a79603118b1b5b8b24c5a223e4
Author: Vivien Malerba <malerba gnome-db org>
Date: Thu Aug 4 19:29:02 2011 +0200
Small correction to GdaConnection
libgda/gda-connection.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/libgda/gda-connection.c b/libgda/gda-connection.c
index 3e34ec2..b20e673 100644
--- a/libgda/gda-connection.c
+++ b/libgda/gda-connection.c
@@ -2730,7 +2730,7 @@ make_col_types_array (va_list args)
{
GType *types;
gint max = 10;
- gint col;
+ gint col, lastidx = 0;
types = g_new0 (GType, max + 1);
types [max] = G_TYPE_NONE;
@@ -2744,7 +2744,16 @@ make_col_types_array (va_list args)
types [max] = G_TYPE_NONE;
}
types [col] = va_arg (args, GType);
+ lastidx = col+1;
}
+
+ if (lastidx == 0) {
+ g_free (types);
+ types = NULL;
+ }
+ else
+ types [lastidx] = G_TYPE_NONE;
+
return types;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]