summaryrefslogtreecommitdiffstats
path: root/src/boilerplate.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/boilerplate.h')
-rw-r--r--src/boilerplate.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/boilerplate.h b/src/boilerplate.h
index 73a0cd5..a893eb1 100644
--- a/src/boilerplate.h
+++ b/src/boilerplate.h
@@ -26,7 +26,10 @@ typedef gpointer gobject;
const g##type tmp = g_value_get_##type(value); \
if (field != tmp) { \
field = tmp; \
- gnome_canvas_item_request_update(GNOME_CANVAS_ITEM(object)); \
+ GnomeCanvasItem* item = GNOME_CANVAS_ITEM(object); \
+ if (item->canvas) { \
+ gnome_canvas_item_request_update(item); \
+ } \
} \
break; \
}