[yelp] [libyelp/yelp-view] Set back_cur to NULL in dispose to prevent crash
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp] [libyelp/yelp-view] Set back_cur to NULL in dispose to prevent crash
- Date: Wed, 19 May 2010 22:22:39 +0000 (UTC)
commit fc29ddafd8c9d1abc3e1f46ed91248b0bc9baecd
Author: Shaun McCance <shaunm gnome org>
Date: Wed May 19 17:22:08 2010 -0500
[libyelp/yelp-view] Set back_cur to NULL in dispose to prevent crash
libyelp/yelp-view.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libyelp/yelp-view.c b/libyelp/yelp-view.c
index d5f00c8..0389c39 100644
--- a/libyelp/yelp-view.c
+++ b/libyelp/yelp-view.c
@@ -282,6 +282,7 @@ yelp_view_dispose (GObject *object)
priv->document = NULL;
}
+ priv->back_cur = NULL;
while (priv->back_list) {
back_entry_free ((YelpBackEntry *) priv->back_list->data);
priv->back_list = g_list_delete_link (priv->back_list, priv->back_list);
@@ -609,7 +610,7 @@ view_scrolled (GtkAdjustment *adjustment,
YelpView *view)
{
YelpViewPrivate *priv = GET_PRIV (view);
- if (priv->back_cur == NULL)
+ if (priv->back_cur == NULL || priv->back_cur->data == NULL)
return;
if (adjustment == priv->vadjustment)
((YelpBackEntry *) priv->back_cur->data)->vadj = gtk_adjustment_get_value (adjustment);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]