[gitg] Check cancellable before loading fallback avatar



commit b3c5de18b51f173e3ad4cc4cf805100810ea432b
Author: Jesse van den Kieboom <jessevdk gmail com>
Date:   Sat Jul 6 16:04:08 2013 +0200

    Check cancellable before loading fallback avatar

 libgitg/gitg-avatar-cache.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libgitg/gitg-avatar-cache.vala b/libgitg/gitg-avatar-cache.vala
index c6fb791..7a71d5d 100644
--- a/libgitg/gitg-avatar-cache.vala
+++ b/libgitg/gitg-avatar-cache.vala
@@ -56,7 +56,7 @@ public class Gitg.AvatarCache : Object
 
                var pixbuf = yield read_avatar_from_file(id, gfile, cancellable);
 
-               if (pixbuf == null)
+               if (pixbuf == null && (cancellable == null || !cancellable.is_cancelled()))
                {
                        gravatar = @"http://robohash.org/$(id).png?size=50x50";
                        gfile = File.new_for_uri(gravatar);



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