aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2010-09-03 00:28:38 +0800
committerPhilip Withnall <philip.withnall@collabora.co.uk>2010-09-03 19:03:38 +0800
commit9a1557d2740bcb627033bb2cdd6593d31d081c19 (patch)
treec001b23a5c20e60e66d4a6cf68ca10ee37267b7d
parent569e01b98e70c3a51eeb8f8eb8dc3871f871c62d (diff)
downloadgsoc2013-empathy-9a1557d2740bcb627033bb2cdd6593d31d081c19.tar
gsoc2013-empathy-9a1557d2740bcb627033bb2cdd6593d31d081c19.tar.gz
gsoc2013-empathy-9a1557d2740bcb627033bb2cdd6593d31d081c19.tar.bz2
gsoc2013-empathy-9a1557d2740bcb627033bb2cdd6593d31d081c19.tar.lz
gsoc2013-empathy-9a1557d2740bcb627033bb2cdd6593d31d081c19.tar.xz
gsoc2013-empathy-9a1557d2740bcb627033bb2cdd6593d31d081c19.tar.zst
gsoc2013-empathy-9a1557d2740bcb627033bb2cdd6593d31d081c19.zip
Handle the EmpathyIndividualWidget disappearing during an async details call
The EmpathyIndividualWidget may be destroyed between starting and finishing an async call to get contact details. This patch prevents the finishing callback from accessing private data which may have been freed.
-rw-r--r--libempathy-gtk/empathy-individual-widget.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-individual-widget.c b/libempathy-gtk/empathy-individual-widget.c
index 08a18d5ff..36cea8a5e 100644
--- a/libempathy-gtk/empathy-individual-widget.c
+++ b/libempathy-gtk/empathy-individual-widget.c
@@ -350,15 +350,18 @@ details_feature_prepared_cb (TpConnection *connection,
DetailsData *data)
{
EmpathyIndividualWidget *self = data->widget;
- EmpathyIndividualWidgetPriv *priv = GET_PRIV (self);
+ EmpathyIndividualWidgetPriv *priv = NULL;
- if (tp_proxy_prepare_finish (connection, res, NULL) == FALSE)
+ if (tp_proxy_prepare_finish (connection, res, NULL) == FALSE || self == NULL)
{
- gtk_widget_hide (priv->vbox_details);
+ if (self != NULL)
+ gtk_widget_hide (GET_PRIV (self)->vbox_details);
details_data_free (data);
return;
}
+ priv = GET_PRIV (self);
+
/* Request the Individual's info */
gtk_widget_show (priv->vbox_details);
gtk_widget_show (priv->hbox_details_requested);