[Swfdec] libswfdec/swfdec_loader.c
Benjamin Otte
company at kemper.freedesktop.org
Wed Nov 28 08:33:21 PST 2007
libswfdec/swfdec_loader.c | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit cbe23b23a56d6529aa7d3800bc626f427a08a3b0
Author: Benjamin Otte <otte at gnome.org>
Date: Wed Nov 28 17:33:13 2007 +0100
don't trigger g_warnings for empty files
diff --git a/libswfdec/swfdec_loader.c b/libswfdec/swfdec_loader.c
index 02c25f1..50d9122 100644
--- a/libswfdec/swfdec_loader.c
+++ b/libswfdec/swfdec_loader.c
@@ -611,6 +611,10 @@ swfdec_loader_get_text (SwfdecLoader *loader, guint version)
/* get the text from the loader */
size = swfdec_buffer_queue_get_depth (loader->queue);
+ if (size == 0) {
+ SWFDEC_LOG ("empty loader, returning empty string");
+ return g_strdup ("");
+ }
raw = g_try_malloc (size + 1);
if (!raw) {
SWFDEC_ERROR ("not enough memory to copy %u bytes", size);
More information about the Swfdec
mailing list