diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2010-08-19 10:18:05 +0200 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2010-08-19 11:15:39 +0200 |
commit | 8fce08d237805e9543f0a82e4fadf224c00394fc (patch) | |
tree | e12b41f6823204e255cd7ed9b0ce2ef19420ae79 /src/tls-certificate.c | |
parent | ed7c9ba0044484cc559ca3d55a9572f95e141d7a (diff) |
Chain up to parent's constructed() before running ours
Also, use a temporary variable to save the function pointer, so that we
can avoid doing the G_OBJECT_CLASS type-check twice in a row.
Diffstat (limited to 'src/tls-certificate.c')
-rw-r--r-- | src/tls-certificate.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/tls-certificate.c b/src/tls-certificate.c index bb541a029..4c8ee5cc2 100644 --- a/src/tls-certificate.c +++ b/src/tls-certificate.c @@ -175,14 +175,15 @@ static void gabble_tls_certificate_constructed (GObject *object) { GabbleTLSCertificate *self = GABBLE_TLS_CERTIFICATE (object); + void (*chain_up) (GObject *) = + G_OBJECT_CLASS (gabble_tls_certificate_parent_class)->constructed; + + if (chain_up != NULL) + chain_up (object); /* register the certificate on the bus */ tp_dbus_daemon_register_object (self->priv->daemon, self->priv->object_path, self); - - if (G_OBJECT_CLASS - (gabble_tls_certificate_parent_class)->constructed != NULL) - G_OBJECT_CLASS (gabble_tls_certificate_parent_class)->constructed (object); } static void |