Permalink
Browse files

Fix segfault on offsetted labels with multiple styles (#5326)

  • Loading branch information...
1 parent 370a81c commit 83011315f539c8a5bf86550cea0c08e77b563e64 @tbonfort tbonfort committed Sep 20, 2016
Showing with 3 additions and 3 deletions.
  1. +3 −3 mapdraw.c
View
@@ -2269,7 +2269,7 @@ void offsetAndTest(mapObj *map, labelCacheMemberObj *cachePtr, double ox, double
}
}
for(j=0; j<ts->label->numstyles; j++) {
- if(ts->label->styles[i]->_geomtransform.type == MS_GEOMTRANSFORM_LABELPOINT) {
+ if(ts->label->styles[j]->_geomtransform.type == MS_GEOMTRANSFORM_LABELPOINT) {
scratch->poly = scratch_line;
offset_label_bounds(ts->style_bounds[j], scratch, ox, oy);
status = msTestLabelCacheCollisions(map, cachePtr, scratch, priority, label_idx);
@@ -2313,8 +2313,8 @@ void offsetAndTest(mapObj *map, labelCacheMemberObj *cachePtr, double ox, double
}
if(ts->style_bounds) {
for(j=0; j<ts->label->numstyles; j++) {
- if(ts->label->styles[i]->_geomtransform.type == MS_GEOMTRANSFORM_LABELPOINT ||
- ts->label->styles[i]->_geomtransform.type == MS_GEOMTRANSFORM_LABELPOLY) {
+ if(ts->label->styles[j]->_geomtransform.type == MS_GEOMTRANSFORM_LABELPOINT ||
+ ts->label->styles[j]->_geomtransform.type == MS_GEOMTRANSFORM_LABELPOLY) {
offset_label_bounds(ts->style_bounds[j], ts->style_bounds[j], ox, oy);
}
}

0 comments on commit 8301131

Please sign in to comment.