[msitools] libmsi: guard calls of parent class constructed method
- From: Marc-Andre Lureau <malureau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [msitools] libmsi: guard calls of parent class constructed method
- Date: Thu, 17 Jan 2013 16:37:25 +0000 (UTC)
commit 482ea4104953dd882ce435e3d45320b3f7114d72
Author: Paolo Bonzini <pbonzini redhat com>
Date: Thu Jan 17 13:48:48 2013 +0100
libmsi: guard calls of parent class constructed method
RHEL6's glib 2.22 leaves a NULL pointer there.
libmsi/libmsi-database.c | 3 ++-
libmsi/libmsi-query.c | 3 ++-
libmsi/libmsi-record.c | 3 ++-
libmsi/libmsi-summary-info.c | 3 ++-
4 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/libmsi/libmsi-database.c b/libmsi/libmsi-database.c
index 5bf3321..1a0da2f 100644
--- a/libmsi/libmsi-database.c
+++ b/libmsi/libmsi-database.c
@@ -101,7 +101,8 @@ libmsi_database_init (LibmsiDatabase *self)
static void
libmsi_database_constructed (GObject *object)
{
- G_OBJECT_CLASS (libmsi_database_parent_class)->constructed (object);
+ if (G_OBJECT_CLASS (libmsi_database_parent_class)->constructed)
+ G_OBJECT_CLASS (libmsi_database_parent_class)->constructed (object);
}
static void
diff --git a/libmsi/libmsi-query.c b/libmsi/libmsi-query.c
index c4e919b..eacbb8c 100644
--- a/libmsi/libmsi-query.c
+++ b/libmsi/libmsi-query.c
@@ -107,7 +107,8 @@ libmsi_query_get_property (GObject *object, guint prop_id, GValue *value, GParam
static void
libmsi_query_constructed (GObject *object)
{
- G_OBJECT_CLASS (libmsi_query_parent_class)->constructed (object);
+ if (G_OBJECT_CLASS (libmsi_query_parent_class)->constructed)
+ G_OBJECT_CLASS (libmsi_query_parent_class)->constructed (object);
}
static void
diff --git a/libmsi/libmsi-record.c b/libmsi/libmsi-record.c
index da5d8bf..645d7eb 100644
--- a/libmsi/libmsi-record.c
+++ b/libmsi/libmsi-record.c
@@ -122,7 +122,8 @@ libmsi_record_constructed (GObject *object)
// FIXME: +1 could be removed if accessing with idx-1
self->fields = g_new0 (LibmsiField, self->count + 1);
- G_OBJECT_CLASS (libmsi_record_parent_class)->constructed (object);
+ if (G_OBJECT_CLASS (libmsi_record_parent_class)->constructed)
+ G_OBJECT_CLASS (libmsi_record_parent_class)->constructed (object);
}
static void
diff --git a/libmsi/libmsi-summary-info.c b/libmsi/libmsi-summary-info.c
index c8d9234..ee9d32d 100644
--- a/libmsi/libmsi-summary-info.c
+++ b/libmsi/libmsi-summary-info.c
@@ -128,7 +128,8 @@ libmsi_summary_info_constructed (GObject *object)
}
}
- G_OBJECT_CLASS (libmsi_summary_info_parent_class)->constructed (object);
+ if (G_OBJECT_CLASS (libmsi_summary_info_parent_class)->constructed)
+ G_OBJECT_CLASS (libmsi_summary_info_parent_class)->constructed (object);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]