[connections/gnome-41] collection-view-child: Make sure thumbnail pixbuf is defined



commit 6d1504f39d6fc740e7e625e7e9278ff66cc41b6f
Author: Felipe Borges <felipeborges gnome org>
Date:   Tue Aug 17 14:29:27 2021 +0200

    collection-view-child: Make sure thumbnail pixbuf is defined

 src/collection-view-child.vala | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/collection-view-child.vala b/src/collection-view-child.vala
index 0467e38..597b820 100644
--- a/src/collection-view-child.vala
+++ b/src/collection-view-child.vala
@@ -54,10 +54,15 @@ namespace Connections {
                     return false;
                 }
 
-                thumbnail.set_from_pixbuf (connection.thumbnail.scale_simple (180, 134,
-                                                                              Gdk.InterpType.BILINEAR));
+                if (connection.thumbnail == null)
+                    return false;
+
+                var pixbuf = connection.thumbnail.scale_simple (180, 134,
+                                                                Gdk.InterpType.BILINEAR);
+                thumbnail.set_from_pixbuf (pixbuf);
 
                 return true;
+
             });
         }
 


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