image->rows=(size_t) floor(metrics.height+draw_info->stroke_width+0.5);
}
else
- if ((strlen(label) > 0) &&
+ if ((status != MagickFalse) && (strlen(label) > 0) &&
(((image->columns == 0) || (image->rows == 0)) ||
(fabs(image_info->pointsize) < MagickEpsilon)))
{
((image->rows != 0) && (height >= image->rows)))
break;
}
+ if (status == MagickFalse)
+ {
+ draw_info=DestroyDrawInfo(draw_info);
+ image=DestroyImageList(image);
+ return((Image *) NULL);
+ }
high=draw_info->pointsize;
for (low=1.0; (high-low) > 0.5; )
{
else
high=draw_info->pointsize-0.5;
}
- draw_info->pointsize=(low+high)/2.0-0.5;
+ if (status != MagickFalse)
+ {
+ draw_info->pointsize=(low+high)/2.0-0.5;
+ status=GetMultilineTypeMetrics(image,draw_info,&metrics,exception);
+ }
}
- status=GetMultilineTypeMetrics(image,draw_info,&metrics,exception);
if (status == MagickFalse)
{
draw_info=DestroyDrawInfo(draw_info);