Skip to content

Commit

Permalink
Check image->exception after calling GetTypeMetrics or GetMultilineTy…
Browse files Browse the repository at this point in the history
…peMetrics
  • Loading branch information
rmagick committed May 7, 2006
1 parent 0b0cefa commit c22e2e4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ext/RMagick/rmdraw.c
@@ -1,4 +1,4 @@
/* $Id: rmdraw.c,v 1.30 2006/05/07 21:41:11 rmagick Exp $ */
/* $Id: rmdraw.c,v 1.31 2006/05/07 21:47:23 rmagick Exp $ */
/*============================================================================\
| Copyright (C) 2006 by Timothy P. Hunter
| Name: rmdraw.c
Expand Down Expand Up @@ -1341,6 +1341,9 @@ get_type_metrics(

if (!okay)
{
rm_handle_image_exception(image, RetainOnError);

// Shouldn't get here...
rb_raise(rb_eRuntimeError, "Can't measure text. Are the fonts installed? "
"Is the FreeType library installed?");
}
Expand Down

0 comments on commit c22e2e4

Please sign in to comment.