diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2003-07-02 02:04:00 +0000 |
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2003-07-02 02:04:00 +0000 |
| commit | 46d834aad23c9867a6768f55eab6de02198166f4 (patch) | |
| tree | 4e394c1f1fdf413745032d50419816375327df89 | |
| parent | 989500b347bd9720c1bc0514a642eaf62c984435 (diff) | |
| download | php-git-46d834aad23c9867a6768f55eab6de02198166f4.tar.gz | |
Fixed a crash when text is added before a font is specified.
| -rw-r--r-- | ext/ming/ming.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/ming/ming.c b/ext/ming/ming.c index 2e1be95d18..b69ffaf4e4 100644 --- a/ext/ming/ming.c +++ b/ext/ming/ming.c @@ -2386,6 +2386,11 @@ PHP_FUNCTION(swftext_addString) if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &s) == FAILURE) { WRONG_PARAM_COUNT; } + if (!getFont(getText(getThis() TSRMLS_CC))) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "You must specify a font before writing text."); + RETURN_FALSE; + } + convert_to_string_ex(s); SWFText_addString(text, Z_STRVAL_PP(s), NULL); } |
