[gdk-pixbuf] Bail out as soon as you find a module that matches mime type



commit 258ba2d093435c89b6432546336bd89578cb1674
Author: William Jon McCann <jmccann redhat com>
Date:   Wed Aug 15 15:04:00 2012 -0400

    Bail out as soon as you find a module that matches mime type
    
    https://bugzilla.gnome.org/show_bug.cgi?id=681943

 gdk-pixbuf/gdk-pixbuf-io.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
index e3ddb08..2c358b9 100644
--- a/gdk-pixbuf/gdk-pixbuf-io.c
+++ b/gdk-pixbuf/gdk-pixbuf-io.c
@@ -927,6 +927,9 @@ _gdk_pixbuf_get_module (guchar *buffer, guint size,
                         g_free (type);
                 }
 
+                if (selected != NULL)
+                        break;
+
 		/* Make sure the builtin GdkPixdata support works even without mime sniffing */
 		if (strcmp (info->name, "GdkPixdata") == 0 &&
 		    format_check (module, buffer, size) == 100) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]