diff options
| author | mjwybrow <mjwybrow@users.sourceforge.net> | 2008-01-02 06:04:28 +0000 |
|---|---|---|
| committer | mjwybrow <mjwybrow@users.sourceforge.net> | 2008-01-02 06:04:28 +0000 |
| commit | e8a2069bb9cd1e10f4e4b1ef1b23b4c3609d1eff (patch) | |
| tree | 707a70546673ccce498798b10a53252f178769b5 /src/sp-item.cpp | |
| parent | finished preparation of localisation for additional terms (diff) | |
| download | inkscape-e8a2069bb9cd1e10f4e4b1ef1b23b4c3609d1eff.tar.gz inkscape-e8a2069bb9cd1e10f4e4b1ef1b23b4c3609d1eff.zip | |
2008-01-02 Michael Wybrow <mjwybrow@users.sourceforge.net>
* src/sp-item.cpp: Fix bug #167898, where a triggered document update
prior to connectoor rerouting could attempt to access a deleted
object clip_ref during ungrouping, causing a crash.
(bzr r4360)
Diffstat (limited to 'src/sp-item.cpp')
| -rw-r--r-- | src/sp-item.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/sp-item.cpp b/src/sp-item.cpp index ec168f03f..f064b246c 100644 --- a/src/sp-item.cpp +++ b/src/sp-item.cpp @@ -404,6 +404,14 @@ sp_item_release(SPObject *object) item->_clip_ref_connection.disconnect(); item->_mask_ref_connection.disconnect(); + // Note: do this here before the clip_ref is deleted, since calling + // sp_document_ensure_up_to_date for triggered routing may reference + // the deleted clip_ref. + if (item->avoidRef) { + delete item->avoidRef; + item->avoidRef = NULL; + } + if (item->clip_ref) { item->clip_ref->detach(); delete item->clip_ref; @@ -416,11 +424,6 @@ sp_item_release(SPObject *object) item->mask_ref = NULL; } - if (item->avoidRef) { - delete item->avoidRef; - item->avoidRef = NULL; - } - if (((SPObjectClass *) (parent_class))->release) { ((SPObjectClass *) parent_class)->release(object); } |
