Skip to content

Commit

Permalink
Fix crash when copying a map with label leaders
Browse files Browse the repository at this point in the history
  • Loading branch information
pagameba committed Oct 6, 2014
1 parent d597a28 commit 2f200c0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mapcopy.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ int msCopyLabel(labelObj *dst, labelObj *src)

if(src->leader) {
dst->leader = msSmallMalloc(sizeof(labelLeaderObj));
initLeader(dst->leader);
msCopyLabelLeader(dst->leader,src->leader);
} else {
if(dst->leader) {
Expand Down Expand Up @@ -573,6 +574,7 @@ int msCopyClass(classObj *dst, classObj *src, layerObj *layer)
}
if(!dst->leader) {
dst->leader = msSmallMalloc(sizeof(labelLeaderObj));
initLeader(dst->leader);
}
msCopyLabelLeader(dst->leader,src->leader);
}
Expand Down

0 comments on commit 2f200c0

Please sign in to comment.