Permalink
Browse files

Fix regression introduced by latest commit 8f85f8d (#5502)

  • Loading branch information...
rouault committed Nov 3, 2017
1 parent 8f85f8d commit 1ee7e0e87125fb1f94ec382a8bd71d2c09c56ea4
Showing with 6 additions and 2 deletions.
  1. +6 −2 mapproject.c
View
@@ -979,6 +979,8 @@ int msProjectRect(projectionObj *in, projectionObj *out, rectObj *rect)
#else
char *over = "+over";
int ret;
int bFreeInOver = MS_FALSE;
int bFreeOutOver = MS_FALSE;
projectionObj in_over,out_over,*inp,*outp;
double dfLonWrap = 0.0;
@@ -1034,13 +1036,15 @@ int msProjectRect(projectionObj *in, projectionObj *out, rectObj *rect)
*/
else {
if(out) {
bFreeOutOver = MS_TRUE;
msInitProjection(&out_over);
msCopyProjectionExtended(&out_over,out,&over,1);
outp = &out_over;
} else {
outp = out;
}
if(in) {
bFreeInOver = MS_TRUE;
msInitProjection(&in_over);
msCopyProjectionExtended(&in_over,in,&over,1);
inp = &in_over;
@@ -1049,9 +1053,9 @@ int msProjectRect(projectionObj *in, projectionObj *out, rectObj *rect)
}
}
ret = msProjectRectAsPolygon(inp,outp, rect );
if(in)
if(bFreeInOver)
msFreeProjection(&in_over);
if(out)
if(bFreeOutOver)
msFreeProjection(&out_over);
return ret;
#endif

0 comments on commit 1ee7e0e

Please sign in to comment.