diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2007-12-04 23:53:07 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2007-12-04 23:53:07 +0000 |
| commit | f05bc5ae90d7062cf145f7dbb0e4802ba98c0bb9 (patch) | |
| tree | d8905e65c39744ae5c3891c88c12471a74c83ccd /src/sp-namedview.cpp | |
| parent | 3D grid: When snapping, consider both left and right vertical lines next to t... (diff) | |
| download | inkscape-f05bc5ae90d7062cf145f7dbb0e4802ba98c0bb9.tar.gz inkscape-f05bc5ae90d7062cf145f7dbb0e4802ba98c0bb9.zip | |
don't crash upon adding strange named XML element to namedview.
(bzr r4172)
Diffstat (limited to 'src/sp-namedview.cpp')
| -rw-r--r-- | src/sp-namedview.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sp-namedview.cpp b/src/sp-namedview.cpp index 03cc4bdad..a26d1ce0e 100644 --- a/src/sp-namedview.cpp +++ b/src/sp-namedview.cpp @@ -513,9 +513,10 @@ static void sp_namedview_child_added(SPObject *object, Inkscape::XML::Node *chil const gchar *id = child->attribute("id"); if (!strcmp(child->name(), "inkscape:grid")) { sp_namedview_add_grid(nv, child, NULL); - } else { + } else if (id) { SPObject *no = object->document->getObjectById(id); - g_assert(SP_IS_OBJECT(no)); + if ( !SP_IS_OBJECT(no) ) + return; if (SP_IS_GUIDE(no)) { SPGuide *g = (SPGuide *) no; |
