]> granicus.if.org Git - php/commitdiff
MFH
authorIlia Alshanetsky <iliaa@php.net>
Thu, 12 Dec 2002 21:17:55 +0000 (21:17 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 12 Dec 2002 21:17:55 +0000 (21:17 +0000)
ext/gd/gd.c

index e6b550a2222470d5c6be8545393482bdd2c5474d..6ce545e708d072f2dc3e83c591d290e0ffe98db1 100644 (file)
@@ -3298,6 +3298,13 @@ PHP_FUNCTION(imagepstext)
                extend = T1_GetExtend(*f_ind);
                str_path = T1_GetCharOutline(*f_ind, _str[0], Z_LVAL_PP(sz), transform);
 
+               if (!str_path) {
+                       if (T1_errno) {
+                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "libt1 returned error %d", T1_errno);
+                       }       
+                       RETURN_FALSE;
+               }
+
                for (i = 1; i < Z_STRLEN_PP(str); i++) {
                        amount_kern = (int) T1_GetKerning(*f_ind, _str[i-1], _str[i]);
                        amount_kern += _str[i-1] == ' ' ? space : 0;