[libgda/LIBGDA_4.0] Correction in GdaBlob copy
- From: Vivien Malerba <vivien src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libgda/LIBGDA_4.0] Correction in GdaBlob copy
- Date: Wed, 30 Dec 2009 21:27:29 +0000 (UTC)
commit 296a903bd1c97cbb836b5e74a1803736132dd4df
Author: Vivien Malerba <malerba gnome-db org>
Date: Wed Dec 30 22:21:02 2009 +0100
Correction in GdaBlob copy
libgda/gda-value.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/libgda/gda-value.c b/libgda/gda-value.c
index 5e91327..a232225 100644
--- a/libgda/gda-value.c
+++ b/libgda/gda-value.c
@@ -423,8 +423,10 @@ gda_blob_copy (gpointer boxed)
g_return_val_if_fail (src, NULL);
copy = g_new0 (GdaBlob, 1);
- ((GdaBinary *)copy)->data = g_memdup (((GdaBinary *)src)->data, ((GdaBinary *)src)->binary_length);
- ((GdaBinary *)copy)->binary_length = ((GdaBinary *)src)->binary_length;
+ if (((GdaBinary *)src)->data) {
+ ((GdaBinary *)copy)->data = g_memdup (((GdaBinary *)src)->data, ((GdaBinary *)src)->binary_length);
+ ((GdaBinary *)copy)->binary_length = ((GdaBinary *)src)->binary_length;
+ }
gda_blob_set_op (copy, src->op);
return copy;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]