diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2007-11-28 23:51:56 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2007-11-28 23:51:56 +0000 |
| commit | 3186755632967150e0b687811cd5856c7ec8c9ec (patch) | |
| tree | 518bb999438838a7f7818405dd8299d2c5b86169 /src/sp-shape.cpp | |
| parent | Remove debug messages (diff) | |
| download | inkscape-3186755632967150e0b687811cd5856c7ec8c9ec.tar.gz inkscape-3186755632967150e0b687811cd5856c7ec8c9ec.zip | |
Fix Bug #172582 crash when dragging line with mouse
(bzr r4142)
Diffstat (limited to 'src/sp-shape.cpp')
| -rw-r--r-- | src/sp-shape.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/sp-shape.cpp b/src/sp-shape.cpp index 13500862a..7029af194 100644 --- a/src/sp-shape.cpp +++ b/src/sp-shape.cpp @@ -1119,13 +1119,13 @@ static void sp_shape_snappoints(SPItem const *item, SnapPointsIter p) NArtBpath const *bp = SP_CURVE_BPATH(shape->curve); gchar const *nodetypes = item->repr->attribute("sodipodi:nodetypes"); - int nodetype_index = 0; - - bool nodetypes_out_of_date = strlen(nodetypes) != (size_t)(shape->curve->end); - // nodetypes might still be empty, e.g. for pure SVG files - // or it might not have been updated yet - - if (bp->code == NR_MOVETO) { // Indicates the start of a closed subpath, see nr-path-code.h + int nodetype_index = 0; + + bool nodetypes_out_of_date = (!nodetypes) || (strlen(nodetypes) != (size_t)(shape->curve->end)); + // nodetypes might still be empty, e.g. for pure SVG files + // or it might not have been updated yet + + if (bp->code == NR_MOVETO) { // Indicates the start of a closed subpath, see nr-path-code.h bp++; //The first point of a closed path is coincident with the end point. Skip the first point as we need only one nodetype_index++; } |
