Pekka Lampila
2007-Oct-28 13:37 UTC
[Swfdec] 2 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_format.c
libswfdec/swfdec_as_context.c | 3 +-- libswfdec/swfdec_text_field_movie.c | 3 +++ libswfdec/swfdec_text_format.c | 7 ++++--- 3 files changed, 8 insertions(+), 5 deletions(-) New commits: commit 7f1ffc36007dd423124e030feb5961d75098279b Author: Pekka Lampila <pekka.lampila at iki.fi> Date: Sun Oct 28 15:32:08 2007 +0200 Don't crash in TextField code when TextFormat's creation fails (Fixes: 12974) Also create an object in swfdec_text_format_new even if _global.TextFormat is missing diff --git a/libswfdec/swfdec_text_field_movie.c b/libswfdec/swfdec_text_field_movie.c index e09a7f1..e9c3fed 100644 --- a/libswfdec/swfdec_text_field_movie.c +++ b/libswfdec/swfdec_text_field_movie.c @@ -934,6 +934,9 @@ swfdec_text_field_movie_init_movie (SwfdecMovie *movie) // format text->format_new SWFDEC_TEXT_FORMAT (swfdec_text_format_new_no_properties (cx)); + if (!text->format_new) + return; + swfdec_text_format_set_defaults (text->format_new); text->format_new->color = text->text->color; text->format_new->align = text->text->align; diff --git a/libswfdec/swfdec_text_format.c b/libswfdec/swfdec_text_format.c index e5ab1fa..7006980 100644 --- a/libswfdec/swfdec_text_format.c +++ b/libswfdec/swfdec_text_format.c @@ -1262,14 +1262,15 @@ swfdec_text_format_new_no_properties (SwfdecAsContext *context) ret = g_object_new (SWFDEC_TYPE_TEXT_FORMAT, NULL); swfdec_as_object_add (ret, context, sizeof (SwfdecTextFormat)); + + swfdec_text_format_clear (SWFDEC_TEXT_FORMAT (ret)); + swfdec_as_object_get_variable (context->global, SWFDEC_AS_STR_TextFormat, &val); if (!SWFDEC_AS_VALUE_IS_OBJECT (&val)) - return NULL; + return ret; swfdec_as_object_set_constructor (ret, SWFDEC_AS_VALUE_GET_OBJECT (&val)); - swfdec_text_format_clear (SWFDEC_TEXT_FORMAT (ret)); - return ret; } commit 983c4fcd9bc03bf69026f1824caf5adcee255abf Author: Pekka Lampila <pekka.lampila at iki.fi> Date: Sun Oct 28 15:25:58 2007 +0200 Don't call action script code from debug message diff --git a/libswfdec/swfdec_as_context.c b/libswfdec/swfdec_as_context.c index 663a15c..8fcd976 100644 --- a/libswfdec/swfdec_as_context.c +++ b/libswfdec/swfdec_as_context.c @@ -864,8 +864,7 @@ start: pc = frame->pc; } if (context->exception) { - SWFDEC_ERROR ("Unhandled exception: %s", - swfdec_as_value_to_string (context, &context->exception_value)); + SWFDEC_ERROR ("Unhandled exception"); goto error; } if (check_block && (pc < frame->block_start || pc >= frame->block_end)) {
Reasonably Related Threads
- 9 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_html_parser.c libswfdec/swfdec_style_sheet.c libswfdec/swfdec_style_sheet.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie.h
- 6 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_codec_audio.c libswfdec/swfdec_codec_video.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c
- 4 commits - libswfdec/swfdec_as_object.c libswfdec/swfdec_movie.c libswfdec/swfdec_policy_loader.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_format.c
- 10 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c
- 2 commits - libswfdec/swfdec_text_format.c libswfdec/swfdec_xml.c libswfdec/swfdec_xml.h