[goffice] Canvas: fix another crash.
- From: Morten Welinder <mortenw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [goffice] Canvas: fix another crash.
- Date: Fri, 18 Sep 2009 12:52:54 +0000 (UTC)
commit 1c12efbbe1cb9c9615f046c1c7d928abf39742b2
Author: Morten Welinder <terra gnome org>
Date: Thu Sep 17 12:24:25 2009 -0400
Canvas: fix another crash.
ChangeLog | 11 +++++++++--
goffice/canvas/goc-item.c | 6 +++++-
2 files changed, 14 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f4982ef..60c8158 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,12 +1,19 @@
2009-09-18 Jean Brefort <jean brefort normalesup org>
* docs/reference/goffice-0.8-sections.txt: removed duplicates
- * goffice/canvas/goc-group.c (goc_group_draw_region): remove unuseful call.
- * goffice/canvas/goc-item.c: update documentation and remove unused code.
+ * goffice/canvas/goc-group.c (goc_group_draw_region): remove unuseful
+ call.
+ * goffice/canvas/goc-item.c: update documentation and remove unused
+ code.
* goffice/canvas/goc-item.h: remove unused fields.
* goffice/gtk/goffice-gtk.c: add missing colons.
* goffice/utils/go-style.c: fixed a documentation warning.
+2009-09-17 Morten Welinder <terra gnome org>
+
+ * goffice/canvas/goc-item.c (goc_item_invalidate): Handle the
+ no-parent case without crashing.
+
2009-09-16 Morten Welinder <terra gnome org>
* goffice/canvas/goc-widget.c (goc_widget_init,
diff --git a/goffice/canvas/goc-item.c b/goffice/canvas/goc-item.c
index dac107d..4a6340c 100644
--- a/goffice/canvas/goc-item.c
+++ b/goffice/canvas/goc-item.c
@@ -311,10 +311,14 @@ goc_item_invalidate (GocItem *item)
double x0, y0, x1, y1;
g_return_if_fail (GOC_IS_ITEM (item));
+
+ parent = item->parent;
+ if (!parent)
+ return;
+
if (!GTK_WIDGET_REALIZED (item->canvas))
return;
- parent = item->parent;
if (!item->cached_bounds)
goc_item_update_bounds (GOC_ITEM (item)); /* don't care about const */
x0 = item->x0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]