~doctormo/inkscape/css-style

« back to all changes in this revision

Viewing changes to src/ui/tool/control-point-selection.cpp

  • Committer: Johan B. C. Engelen
  • Date: 2014-03-20 23:16:02 UTC
  • Revision ID: j.b.c.engelen@alumnus.utwente.nl-20140320231602-69h4sm1czvcak8eh
control-point-selection : fix a (very unlikely) crash upon dereferencing unitialized bound variable

Show diffs side-by-side

added added

removed removed

Lines of Context:
194
194
        bound.unionWith(Geom::OptInterval((*i)->position()[d]));
195
195
    }
196
196
 
 
197
    if (!bound) { return; }
 
198
 
197
199
    double new_coord = bound->middle();
198
200
    for (iterator i = _points.begin(); i != _points.end(); ++i) {
199
201
        Geom::Point pos = (*i)->position();
220
222
        bound.unionWith(Geom::OptInterval(pos[d]));
221
223
    }
222
224
 
 
225
    if (!bound) { return; }
 
226
 
223
227
    // now we iterate over the multimap and set aligned positions.
224
228
    double step = size() == 1 ? 0 : bound->extent() / (size() - 1);
225
229
    double start = bound->min();