- path->offset((SplashCoord)x, (SplashCoord)y);
- int t;
- for(t=0;t<path->getLength();t++) {
- double xx,yy;
- Guchar f;
- path->getPoint(t,&xx,&yy,&f);
- state->transform(xx,yy,&xx,&yy);
- if(xx<x1) x1=(int)xx;
- if(yy<y1) y1=(int)yy;
- if(xx>=x2) x2=(int)xx+1;
- if(yy>=y2) y2=(int)yy+1;
+ if(path) {
+ path->offset((SplashCoord)x, (SplashCoord)y);
+ int t;
+ for(t=0;t<path->getLength();t++) {
+ double xx,yy;
+ Guchar f;
+ path->getPoint(t,&xx,&yy,&f);
+ state->transform(xx,yy,&xx,&yy);
+ if(xx<x1) x1=(int)xx;
+ if(yy<y1) y1=(int)yy;
+ if(xx>=x2) x2=(int)xx+1;
+ if(yy>=y2) y2=(int)yy+1;
+ }
+ delete(path);path=0;