From 8a29647e1cf44ce6234fe8cf150566325994496b Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 7 May 2014 14:25:33 +0200 Subject: [PATCH] wocky-jingle-info: don't try using self if it's NULL This callback can deal with self being destroyed but it was trying to access self->priv before early returning. --- wocky/wocky-jingle-info.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/wocky/wocky-jingle-info.c b/wocky/wocky-jingle-info.c index 07b6d28..94b189e 100644 --- a/wocky/wocky-jingle-info.c +++ b/wocky/wocky-jingle-info.c @@ -274,7 +274,6 @@ stun_server_resolved_cb (GObject *resolver, { PendingStunServer *data = user_data; WockyJingleInfo *self = data->factory; - WockyJingleInfoPrivate *priv = self->priv; GError *e = NULL; WockyStunServer *stun_server; gchar *address; @@ -311,13 +310,13 @@ stun_server_resolved_cb (GObject *resolver, if (data->source == WOCKY_STUN_SERVER_FALLBACK) { - wocky_stun_server_free (priv->fallback_stun_server); - priv->fallback_stun_server = stun_server; + wocky_stun_server_free (self->priv->fallback_stun_server); + self->priv->fallback_stun_server = stun_server; } else { - wocky_stun_server_free (priv->stun_server); - priv->stun_server = stun_server; + wocky_stun_server_free (self->priv->stun_server); + self->priv->stun_server = stun_server; g_signal_emit (self, signals[STUN_SERVER_CHANGED], 0, stun_server, data->stun_port); -- 1.9.0